pub enum ParseError {
    UnexpectedEndOfInput(ParseErrorEndOfInput),
    UnexpectedChar(ParseErrorUnexpectedChar),
    UnexpectedToken(ParseErrorUnexpectedToken),
    IncorrectUTF16NoLowSurrogate(ParseErrorIncorrectEncodingSequence),
    IncorrectUTF16NoHighSurrogate(ParseErrorIncorrectEncodingSequence),
}
Expand description

Represents a lexical or syntactic error

Variants§

§

UnexpectedEndOfInput(ParseErrorEndOfInput)

Lexical error occurring when the end of input has been encountered while more characters were expected

§

UnexpectedChar(ParseErrorUnexpectedChar)

Lexical error occurring when an unexpected character is encountered in the input preventing to match tokens

§

UnexpectedToken(ParseErrorUnexpectedToken)

Syntactic error occurring when an unexpected token is encountered by the parser

§

IncorrectUTF16NoLowSurrogate(ParseErrorIncorrectEncodingSequence)

Lexical error occurring when the low surrogate encoding point is missing in a UTF-16 encoding sequence with an expected high and low surrogate pair

§

IncorrectUTF16NoHighSurrogate(ParseErrorIncorrectEncodingSequence)

Lexical error occurring when the high surrogate encoding point is missing in a UTF-16 encoding sequence with an expected high and low surrogate pair

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

Gets the error’s position in the input

Gets the error’s length in the input (in number of characters)

Gets the error’s message

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
Converts the given value to a String. 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.