pub enum ParserErrorKind {
Show 17 variants SecondRootSection { label: String, }, SectionLevelTooDeep { level: usize, }, UnmatchedDoubleCloseBrace, UnmatchedDoubleOpenBrace, UnmatchedDoubleCloseBracket, UnmatchedDoubleOpenBracket, UnmatchedNoWikiClose, UnmatchedNoWikiOpen, UnexpectedTokenInTag { token: String, }, UnexpectedTokenInParameter { token: String, }, UnexpectedTokenInLink { token: String, }, UnexpectedTokenInLinkLabel { token: String, }, UnexpectedTokenInFormattedText { token: String, }, UnexpectedTokenInListItem { token: String, }, UnexpectedToken { expected: String, actual: String, }, UnclosedTextFormatting { formatting: TextFormatting, }, UnexpectedEof,
}
Expand description

The kind of parser error.

Variants§

§

SecondRootSection

Fields

§label: String

The label of the second root section.

Found a second root section, but only one is allowed.

§

SectionLevelTooDeep

Fields

§level: usize

The too deep level.

Found a section at a level that is deeper than supported.

§

UnmatchedDoubleCloseBrace

Found a double close brace that does not match any opened one.

§

UnmatchedDoubleOpenBrace

Found a double open brace that does not match any closed one.

§

UnmatchedDoubleCloseBracket

Found a double close bracket that does not match any opened one.

§

UnmatchedDoubleOpenBracket

Found a double open bracket that does not match any closed one.

§

UnmatchedNoWikiClose

Found a </nowiki> that does not match any <nowiki>.

§

UnmatchedNoWikiOpen

Found a <nowiki> that does not match any </nowiki>.

§

UnexpectedTokenInTag

Fields

§token: String

The unexpected token.

A tag contains a token that does not belong there.

§

UnexpectedTokenInParameter

Fields

§token: String

The unexpected token.

A parameter contains a token that does not belong there.

Fields

§token: String

The unexpected token.

A link contains a token that does not belong there.

§

UnexpectedTokenInLinkLabel

Fields

§token: String

The unexpected token.

A link label contains a token that does not belong there.

§

UnexpectedTokenInFormattedText

Fields

§token: String

The unexpected token.

A formatted piece of text contains a token that does not belong there.

§

UnexpectedTokenInListItem

Fields

§token: String

The unexpected token.

A link label contains a token that does not belong there.

§

UnexpectedToken

Fields

§expected: String

The expected token, or a list of possible expected tokens.

§actual: String

The token that was found.

A token was found at a place where it does not belong.

§

UnclosedTextFormatting

Fields

§formatting: TextFormatting

The unclosed formatting expression.

A text formatting expression was not closed.

§

UnexpectedEof

The end of file was found, but further tokens were expected.

Trait Implementations§

source§

impl Debug for ParserErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ParserErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<ParserErrorKind> for ParserErrorKind

source§

fn eq(&self, other: &ParserErrorKind) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ParserErrorKind

source§

impl StructuralEq for ParserErrorKind

source§

impl StructuralPartialEq for ParserErrorKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.