pub struct Document<'d> {
    pub dom: XmlDoc,
    pub path: String,
    pub corpus: &'d Corpus,
    pub dnm: Option<DNM>,
}
Expand description

One of our math documents, thread-friendly

Fields

dom: XmlDoc

The DOM of the document

path: String

The file path of the document

corpus: &'d Corpus

A reference to the corpus containing this document

dnm: Option<DNM>

If it exists, the DNM corresponding to this document

Implementations

Load a new document

Obtain the problem-free logical headings of a libxml Document

Get an iterator over the headings of the document

Obtain the problem-free logical paragraphs of a libxml Document

Get an iterator over the paragraphs of the document

Get an iterator over textual paragraphs of the document, in a loose sense, contents: abstract (first p), keywords, logical paragraphs, acknowledgement, table/figure captions

Obtain the MathML nodes of a libxml Document

Obtain the <span[class=ltx_ref]> nodes of a libxml Document

Get an iterator over the sentences of the document

Obtain the nodes associated with the xpath evaluation over the underlying libxml Document

Obtain the first node associated with the xpath evaluation over the underlying libxml Document

Get an iterator over a custom xpath selector over the document

Get an iterator using a custom closure predicate filter over the document (depth-first descent)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.