pub enum Reason {
UnmatchedDelimiters(char),
UnexpectedChar(char),
UnknownEscape(char),
InvalidEscape(char),
InvalidDigit(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
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
BadUnicode(u32)
Unicode escape does not map to a valid unicode code-point
EndOfFile
Reached end of input
Trait Implementations§
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