pub struct LexError { /* private fields */ }Expand description
A tokenization failure and the source span that caused it.
Implementations§
Source§impl LexError
impl LexError
Sourcepub fn kind(&self) -> LexErrorKind
pub fn kind(&self) -> LexErrorKind
Returns the error class.
Sourcepub fn unclosed_expression(&self) -> Option<&'static str>
pub fn unclosed_expression(&self) -> Option<&'static str>
Returns the unclosed expression family for a missing group closer.
Trait Implementations§
impl Eq for LexError
Source§impl Error for LexError
impl Error for LexError
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<LexError> for FragmentParseError
impl From<LexError> for FragmentParseError
Source§impl From<LexError> for ParseError
impl From<LexError> for ParseError
Source§impl Spanned for LexError
impl Spanned for LexError
impl StructuralPartialEq for LexError
Auto Trait Implementations§
impl Freeze for LexError
impl RefUnwindSafe for LexError
impl Send for LexError
impl Sync for LexError
impl Unpin for LexError
impl UnsafeUnpin for LexError
impl UnwindSafe for LexError
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