#[non_exhaustive]pub enum LexerError {
EOF,
IllegalCharacter(char),
IllegalState(&'static str),
Message(&'static str),
UnclosedList,
UnclosedQuotedString,
UnrecognizedChar(char),
UnrecognizedDollar(String),
UnrecognizedOctet(u32),
}Expand description
The error kind for lexer errors that get returned in the crate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EOF
Unexpected end of input
IllegalCharacter(char)
An illegal character was found
IllegalState(&'static str)
An illegal state was reached
Message(&'static str)
An error with an arbitrary message, referenced as &’static str
UnclosedList
An unclosed list was found
UnclosedQuotedString
An unclosed quoted string was found
UnrecognizedChar(char)
An unrecognized character was found
UnrecognizedDollar(String)
An unrecognized dollar content was found
UnrecognizedOctet(u32)
An unrecognized octet was found
Trait Implementations§
Source§impl Clone for LexerError
impl Clone for LexerError
Source§fn clone(&self) -> LexerError
fn clone(&self) -> LexerError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LexerError
impl Debug for LexerError
Source§impl Display for LexerError
impl Display for LexerError
Source§impl Error for LexerError
impl Error for LexerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<LexerError> for ParseError
impl From<LexerError> for ParseError
Source§fn from(source: LexerError) -> Self
fn from(source: LexerError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LexerError
impl PartialEq for LexerError
Source§fn eq(&self, other: &LexerError) -> bool
fn eq(&self, other: &LexerError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for LexerError
impl StructuralPartialEq for LexerError
Auto Trait Implementations§
impl Freeze for LexerError
impl RefUnwindSafe for LexerError
impl Send for LexerError
impl Sync for LexerError
impl Unpin for LexerError
impl UnsafeUnpin for LexerError
impl UnwindSafe for LexerError
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