ParseErrorKind

Enum ParseErrorKind 

Source
pub enum ParseErrorKind {
Show 140 variants InvalidArrayStretch { stretch: String, }, DisplayModeOnly { env: String, }, ExpectedArrayDelimiter { found: String, }, InvalidSeparatorType { separator: String, }, TooManyMathInRow { expected: usize, actual: usize, }, ExpectedClosingBracket { found: String, }, FunctionOnlyInArray { func: String, }, ExpectedCdDelimiter { found: String, }, MissingCdArrowChar { arrow: String, }, InvalidCdArrowSpecifier { found: String, }, InvalidSize { size: String, }, UnknownGroupType { group_type: NodeType, }, UnrecognizedGenfracCommand { command: String, }, InvalidGenfracStyle { level: String, }, InvalidEnvironmentName { value: String, }, NoSuchEnvironment { name: String, }, ExpectedEnvironmentAfterEnd { found: String, }, MismatchedEnvironmentEnd { begin: String, end: String, }, InvalidIncludeGraphicsNumber { value: String, }, InvalidIncludeGraphicsUnit { unit: String, }, InvalidIncludeGraphicsSize { size: String, }, InvalidIncludeGraphicsKey { key: String, }, CharNonNumericArgument { value: String, }, UnsupportedWideCharacter { character: String, }, EmptyWideCharacterInput, UnknownStretchyElement { label: String, }, UnsupportedGroupTypeForSvgSpan, LabelMissingBackslashPrefix, InvalidGroupTypeForAccent, UnsupportedStretchyPathCount { count: usize, }, UnsupportedSymbolFont { symbol: String, font: String, }, FontMetricsNotFound { font_family: String, }, MarkupWriteFailure, NewcommandRedefinition { name: String, }, RenewcommandNonexistent { name: String, }, InvalidNewcommandArgumentCount, UnknownSpaceType { name: String, }, ExpectedToken { expected: String, found: String, }, InvalidTokenAfterMacroPrefix { token: String, }, UnexpectedCharacter { character: String, }, InvalidMacroArgumentNumber { value: String, }, ExpectedMacroParameter { expected: usize, found: usize, }, MacroDefinitionMismatch, MacroDelimiterLengthMismatch, MacroTooManyExpansions, MacroIncompletePlaceholder, MacroStackUnexpectedlyEmpty, ExtraCloseBrace, ExpectedControlSequence, ExpectedMacroDefinition, FunctionMissingArguments { func: String, context: String, }, FunctionDisallowedInMode { func: String, mode: Mode, }, UndefinedControlSequence { name: String, }, UnexpectedEndOfMacroArgument { expected: String, }, InvalidColor { color: String, }, ExpectedGroupAs { context: String, }, LimitsMustFollowBase, DoubleSuperscript, DoubleSubscript, MakeOrdExpectedNode, MultipleInfixOperators, InfixOperatorAtStart, InvalidDelimiterAfter { delimiter: String, function: String, }, InvalidDelimiterTypeAfter { function: String, }, ExpectedNode { node: NodeType, }, ExpectedSupSubBaseNode { node: NodeType, }, ExpectedNodeOrSupSub { node: NodeType, }, StrictModeError { message: String, code: String, }, UnrecognizedInfixGenfracCommand { command: String, }, IllegalDelimiter { delim: String, }, InvalidAttributeName { attr: String, }, InvalidUnit { unit: String, }, InvalidGroup { group: String, }, InvalidBaseDigit { base: u32, digit: String, }, Mismatched { what: String, }, NoFunctionHandler { name: String, }, UnknownColumnAlignment { alignment: String, }, ExpectedRawStringFirstArgument, HtmlDataKeyValueParseError, UnrecognizedHtmlCommand, ExpectedColorToken { argument: &'static str, }, ExpectedSizeArgument, ExpectedSizeArgumentFor { context: &'static str, }, ArgumentMustBeSize { position: &'static str, }, ExpectedFunctionAfterPrefix, ExpectedRightAfterLeft, MiddleWithoutPrecedingLeft, LapRequiresSingleArgument, SupSubMissingSupOrSub, ExpectedBaseInSupSub, ExpectedHorizBraceBase, ExpectedHorizBraceOrSupSub, CancelFunctionSingleArgument, AboveArgumentMustBeSize, ArgumentMustBeUrl { context: &'static str, }, CommandNotTrusted { name: &'static str, }, EmptyDelimiterCharacter, StylingTakesNoArguments, GeneratedOrdMissingClasses, SizingTakesNoArguments, EnvironmentHandlerNotImplemented, CharArgumentMustBeOrdGroup, CharOrdGroupContentInvalid, MissingArrowCharacterAfterAt, InvalidArrowCharacter, TooManyTabCharacters, ExpectedColumnAlignmentCharacter, ExpectedOrdGroupOrSymbolNode, ExpectedAlignmentSpecifier, SubarrayTooManyColumns { subarray: &'static str, }, InvalidNumberOfColumns, FailedToCreateCombinedToken, PrimitiveArgumentCannotBeOptional, CurrentColorMustBeString, ExpectedFirstChildDomSpan, ExpectedSecondChildDomSpan, EmptyMacroExpanderStack, CharMissingArgument, MultipleTag, TagNotAllowedInInlineMode, EmptyLookupSymbolInput, OptionalSmashArgumentMustBeOrdGroup, AbovefracSecondArgumentNotInfix, FailedToAppendChild { details: String, }, UnbalancedNamespaceDestruction, MissingDocument, UnknownDelimiterLabel, UnknownAccent { accent: String, }, UnsupportedAccentInMode { accent: String, mode: Mode, }, ExpectedSymbolNode { context: &'static str, }, ExpectedGroupAfterSymbol { symbol: String, }, NullArgument, VerbAssertionFailed, VerbMissingDelimiter, IncludeGraphicsExpectedUrl, InvalidNodeTypeForBuilder { builder: &'static str, }, InvalidCharCodePoint { code: String, }, NewlineNodeNotFound, EnumParse(ParseError), ParseNode(ParseNodeError),
}
Expand description

Describes the specific reason for a ParseError.

Variants§

§

InvalidArrayStretch

Fields

§stretch: String
§

DisplayModeOnly

Fields

§

ExpectedArrayDelimiter

Fields

§found: String
§

InvalidSeparatorType

Fields

§separator: String
§

TooManyMathInRow

Fields

§expected: usize
§actual: usize
§

ExpectedClosingBracket

Fields

§found: String
§

FunctionOnlyInArray

Fields

§func: String
§

ExpectedCdDelimiter

Fields

§found: String
§

MissingCdArrowChar

Fields

§arrow: String
§

InvalidCdArrowSpecifier

Fields

§found: String
§

InvalidSize

Fields

§size: String
§

UnknownGroupType

Fields

§group_type: NodeType
§

UnrecognizedGenfracCommand

Fields

§command: String
§

InvalidGenfracStyle

Fields

§level: String
§

InvalidEnvironmentName

Fields

§value: String
§

NoSuchEnvironment

Fields

§name: String
§

ExpectedEnvironmentAfterEnd

Fields

§found: String
§

MismatchedEnvironmentEnd

Fields

§begin: String
§

InvalidIncludeGraphicsNumber

Fields

§value: String
§

InvalidIncludeGraphicsUnit

Fields

§unit: String
§

InvalidIncludeGraphicsSize

Fields

§size: String
§

InvalidIncludeGraphicsKey

Fields

§

CharNonNumericArgument

Fields

§value: String
§

UnsupportedWideCharacter

Fields

§character: String
§

EmptyWideCharacterInput

§

UnknownStretchyElement

Fields

§label: String
§

UnsupportedGroupTypeForSvgSpan

§

LabelMissingBackslashPrefix

§

InvalidGroupTypeForAccent

§

UnsupportedStretchyPathCount

Fields

§count: usize
§

UnsupportedSymbolFont

Fields

§symbol: String
§font: String
§

FontMetricsNotFound

Fields

§font_family: String
§

MarkupWriteFailure

§

NewcommandRedefinition

Fields

§name: String
§

RenewcommandNonexistent

Fields

§name: String
§

InvalidNewcommandArgumentCount

§

UnknownSpaceType

Fields

§name: String
§

ExpectedToken

Fields

§expected: String
§found: String
§

InvalidTokenAfterMacroPrefix

Fields

§token: String
§

UnexpectedCharacter

Fields

§character: String
§

InvalidMacroArgumentNumber

Fields

§value: String
§

ExpectedMacroParameter

Fields

§expected: usize
§found: usize
§

MacroDefinitionMismatch

§

MacroDelimiterLengthMismatch

§

MacroTooManyExpansions

§

MacroIncompletePlaceholder

§

MacroStackUnexpectedlyEmpty

§

ExtraCloseBrace

§

ExpectedControlSequence

§

ExpectedMacroDefinition

§

FunctionMissingArguments

Fields

§func: String
§context: String
§

FunctionDisallowedInMode

Fields

§func: String
§mode: Mode
§

UndefinedControlSequence

Fields

§name: String
§

UnexpectedEndOfMacroArgument

Fields

§expected: String
§

InvalidColor

Fields

§color: String
§

ExpectedGroupAs

Fields

§context: String
§

LimitsMustFollowBase

§

DoubleSuperscript

§

DoubleSubscript

§

MakeOrdExpectedNode

§

MultipleInfixOperators

§

InfixOperatorAtStart

§

InvalidDelimiterAfter

Fields

§delimiter: String
§function: String
§

InvalidDelimiterTypeAfter

Fields

§function: String
§

ExpectedNode

Fields

§

ExpectedSupSubBaseNode

Fields

§

ExpectedNodeOrSupSub

Fields

§

StrictModeError

Fields

§message: String
§code: String
§

UnrecognizedInfixGenfracCommand

Fields

§command: String
§

IllegalDelimiter

Fields

§delim: String
§

InvalidAttributeName

Fields

§attr: String
§

InvalidUnit

Fields

§unit: String
§

InvalidGroup

Fields

§group: String
§

InvalidBaseDigit

Fields

§base: u32
§digit: String
§

Mismatched

Fields

§what: String
§

NoFunctionHandler

Fields

§name: String
§

UnknownColumnAlignment

Fields

§alignment: String
§

ExpectedRawStringFirstArgument

§

HtmlDataKeyValueParseError

§

UnrecognizedHtmlCommand

§

ExpectedColorToken

Fields

§argument: &'static str
§

ExpectedSizeArgument

§

ExpectedSizeArgumentFor

Fields

§context: &'static str
§

ArgumentMustBeSize

Fields

§position: &'static str
§

ExpectedFunctionAfterPrefix

§

ExpectedRightAfterLeft

§

MiddleWithoutPrecedingLeft

§

LapRequiresSingleArgument

§

SupSubMissingSupOrSub

§

ExpectedBaseInSupSub

§

ExpectedHorizBraceBase

§

ExpectedHorizBraceOrSupSub

§

CancelFunctionSingleArgument

§

AboveArgumentMustBeSize

§

ArgumentMustBeUrl

Fields

§context: &'static str
§

CommandNotTrusted

Fields

§name: &'static str
§

EmptyDelimiterCharacter

§

StylingTakesNoArguments

§

GeneratedOrdMissingClasses

§

SizingTakesNoArguments

§

EnvironmentHandlerNotImplemented

§

CharArgumentMustBeOrdGroup

§

CharOrdGroupContentInvalid

§

MissingArrowCharacterAfterAt

§

InvalidArrowCharacter

§

TooManyTabCharacters

§

ExpectedColumnAlignmentCharacter

§

ExpectedOrdGroupOrSymbolNode

§

ExpectedAlignmentSpecifier

§

SubarrayTooManyColumns

Fields

§subarray: &'static str
§

InvalidNumberOfColumns

§

FailedToCreateCombinedToken

§

PrimitiveArgumentCannotBeOptional

§

CurrentColorMustBeString

§

ExpectedFirstChildDomSpan

§

ExpectedSecondChildDomSpan

§

EmptyMacroExpanderStack

§

CharMissingArgument

§

MultipleTag

§

TagNotAllowedInInlineMode

§

EmptyLookupSymbolInput

§

OptionalSmashArgumentMustBeOrdGroup

§

AbovefracSecondArgumentNotInfix

§

FailedToAppendChild

Fields

§details: String
§

UnbalancedNamespaceDestruction

§

MissingDocument

§

UnknownDelimiterLabel

§

UnknownAccent

Fields

§accent: String
§

UnsupportedAccentInMode

Fields

§accent: String
§mode: Mode
§

ExpectedSymbolNode

Fields

§context: &'static str
§

ExpectedGroupAfterSymbol

Fields

§symbol: String
§

NullArgument

§

VerbAssertionFailed

§

VerbMissingDelimiter

§

IncludeGraphicsExpectedUrl

§

InvalidNodeTypeForBuilder

Fields

§builder: &'static str
§

InvalidCharCodePoint

Fields

§code: String
§

NewlineNodeNotFound

§

EnumParse(ParseError)

§

ParseNode(ParseNodeError)

Trait Implementations§

Source§

impl Debug for ParseErrorKind

Source§

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

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

impl Display for ParseErrorKind

Source§

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

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

impl Error for ParseErrorKind

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ParseErrorKind> for ParseError

Source§

fn from(kind: ParseErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<ParseNodeError> for ParseErrorKind

Source§

fn from(source: ParseNodeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

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

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.