pub struct Page {
    pub format: Option<String>,
    pub model: Option<String>,
    pub namespace: u32,
    pub text: String,
    pub title: String,
}
Expand description

Parsed page.

Parsed from the page element.

Although the format and model elements are defined as mandatory in the schema, previous versions of the schema don’t contain them. Therefore the corresponding fields can be None.

Fields§

§format: Option<String>

The format of the revision if any.

Parsed from the text content of the format element in the revision element. None if the element is not present.

For ordinary articles the format is text/x-wiki.

§model: Option<String>

The model of the revision if any.

Parsed from the text content of the model element in the revision element. None if the element is not present.

For ordinary articles the model is wikitext.

§namespace: u32

The namespace of the page.

Parsed from the text content of the ns element in the page element.

For ordinary articles the namespace is 0.

§text: String

The text of the revision.

Parsed from the text content of the text element in the revision element.

§title: String

The title of the page.

Parsed from the text content of the title element in the page element.

Trait Implementations§

Formats the value using the given formatter. Read more

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 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.