pub struct Error<'code> {
pub buffer: Buffer<'code>,
pub matched: usize,
pub kind: Kind,
}Expand description
Information about the error which occured when the Lexer::lex failed.
Fields§
§buffer: Buffer<'code>§matched: usizeThis is included not just for debug information, but also to allow lexerus_derive::Lexer
to obtain some basic information about how many tokens were matched before the program
failed. This is useful when debugging enum because it would not be immediately obvious
which match pattern failed.
kind: KindTrait Implementations§
Auto Trait Implementations§
impl<'code> Freeze for Error<'code>
impl<'code> RefUnwindSafe for Error<'code>
impl<'code> Send for Error<'code>
impl<'code> Sync for Error<'code>
impl<'code> Unpin for Error<'code>
impl<'code> UnwindSafe for Error<'code>
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