pub enum Reason {
UnmatchedDelimiters(char),
UnexpectedChar(char),
NotIdentifier(char),
UnknownEscape(char),
InvalidEscape(char),
InvalidDigit(char),
UnknownBase(char),
BadUnicode(u32),
EndOfFile,
}
Expand description
The reason for the Error
Variants§
UnmatchedDelimiters(char)
Found an opening delimiter of type char, but not the expected closing delimiter
UnexpectedChar(char)
Found a character that doesn’t belong to any TokenKind
NotIdentifier(char)
Found a character that’s not valid in identifiers while looking for an identifier
UnknownEscape(char)
Found a character that’s not valid in an escape sequence while looking for an escape sequence
InvalidEscape(char)
Escape sequence contains invalid hexadecimal digit or unmatched braces
InvalidDigit(char)
Character is not a valid digit in the requested base
UnknownBase(char)
Base conversion requested, but the base character was not in the set of known characters
BadUnicode(u32)
Unicode escape does not map to a valid unicode code-point
EndOfFile
Reached end of input
Trait Implementations§
source§impl PartialEq for Reason
impl PartialEq for Reason
impl Copy for Reason
impl Eq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnwindSafe for Reason
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more