pub enum ParserErrorKind {
Show 14 variants SecondRootSection { label: String, }, SectionLevelTooDeep { level: usize, }, UnmatchedDoubleCloseBrace, UnmatchedDoubleOpenBrace, UnmatchedDoubleCloseBracket, UnmatchedDoubleOpenBracket, 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, },
}
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.

§

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.

Trait Implementations§

source§

impl Debug for ParserErrorKind

source§

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

Formats the value using the given formatter. Read more

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