pub enum LexerError {
UnexpectedChar(char),
IntegerParse(String),
FloatParse(String),
MissingEndQuote,
MissingRegexEnd,
ExpectedRawString,
InvalidEscapeSequence,
}Expand description
An error occurred while tokenizing source code.
Variants§
UnexpectedChar(char)
An unexpected character was found.
IntegerParse(String)
An error occurred parsing an integer value.
FloatParse(String)
An error occurred parsing a floating point value.
MissingEndQuote
A string literal is missing its end quote.
MissingRegexEnd
A regular expression literal is missing its end slash.
ExpectedRawString
A raw string literal was expected.
InvalidEscapeSequence
An invalid escape sequence in a string literal.
Trait Implementations§
source§impl Clone for LexerError
impl Clone for LexerError
source§fn clone(&self) -> LexerError
fn clone(&self) -> LexerError
Returns a copy of the value. Read more
1.0.0 · 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<'de> Deserialize<'de> for LexerError
impl<'de> Deserialize<'de> for LexerError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 ErrorKind for LexerError
impl ErrorKind for LexerError
source§impl PartialEq for LexerError
impl PartialEq for LexerError
source§impl Serialize for LexerError
impl Serialize for LexerError
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 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
§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more