pub enum WarningMessage {
    Duplicate,
    Empty,
    SectionEmpty,
    Supplementary,
    Unrecognized,
    ValueConflicting,
    ValueUnrecognized,
}
Expand description

Identifier for a kind of warning from the parser.

Variants§

§

Duplicate

The element is a duplicate of something that comes before it.

This may be a heading that contains the same text as a previous heading in the same section, or a parameter that has the same name as a previous parameter to the same template.

§

Empty

The element is missing some required content.

§

SectionEmpty

The section following the heading is missing some required content.

§

Supplementary

The element is recognized but not represented in the output.

The element conveys meaningful information, but this information has not been parsed and is not represented in the output. This applies for example to the templates Doplnit and Viz and the extension tag ref. In contrast to other warnings, this warning does not indicate there is anything wrong with the wiki text. It just indicates that the wiki text contains additional information that is not represented in the output. The element is recognized as valid in the position it occurs, but its content is not parsed, and nothing can be said about whether the content is valid.

§

Unrecognized

The element is not recognized.

This may be because of the type of the element itself or because of anything inside it.

§

ValueConflicting

The value of the element conflicts with information occurring before it.

This can mean for example that a specified language within a section doesn’t match the language specified for the section as a whole.

§

ValueUnrecognized

The element is recognized, but its value is not.

On lists it means that a list with this kind is valid in this position, but something about the list items contained in the list is not recognized.

On templates it means that a template with this name is valid in this position, but something about the parameters of the template is not recognized.

On template parameters it means that a parameter with this name (or lack of name) is valid in this position, but something about the value of the parameter is not recognized.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. 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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.