pub struct LexError {
pub kind: LexErrorKind,
pub offset: u32,
}Expand description
A lexing failure, with the offset of the byte that caused it.
Fields§
§kind: LexErrorKindWhy it failed.
offset: u32The offset the diagnostic points at.
Trait Implementations§
impl Copy for LexError
impl Eq for LexError
Source§impl From<LexError> for ParseError
impl From<LexError> for ParseError
Source§fn from(error: LexError) -> ParseError
fn from(error: LexError) -> ParseError
Lifts a lexer failure into a parse failure at the same offset.
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