pub struct Lexer<'a> {
pub input: &'a [u8],
pub pos: Len,
pub token_start: Len,
pub token_end: Option<Len>,
pub result: u16,
pub timed_out: bool,
/* private fields */
}Fields§
§input: &'a [u8]§pos: Len§token_start: Len§token_end: Option<Len>§result: u16§timed_out: boolImplementations§
Source§impl<'a> Lexer<'a>
impl<'a> Lexer<'a>
pub fn new(input: &'a [u8]) -> Lexer<'a>
pub fn set_deadline(&mut self, deadline: Option<Instant>)
pub fn check_deadline(&mut self) -> bool
pub fn reset(&mut self, p: Len)
pub fn start(&mut self)
pub fn eof(&self) -> bool
pub fn advance(&mut self, skip: bool)
pub fn mark_end(&mut self)
pub fn finish(&mut self)
Auto Trait Implementations§
impl<'a> Forget for Lexer<'a>
impl<'a> Freeze for Lexer<'a>
impl<'a> Move for Lexer<'a>
impl<'a> RefUnwindSafe for Lexer<'a>
impl<'a> Send for Lexer<'a>
impl<'a> Sync for Lexer<'a>
impl<'a> Unpin for Lexer<'a>
impl<'a> UnsafeUnpin for Lexer<'a>where
&'a [u8]: UnsafeUnpin,
impl<'a> UnwindSafe for Lexer<'a>where
&'a [u8]: UnwindSafe,
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