pub struct CharScanner { /* private fields */ }Expand description
A simple char scanner for iterating over source text.
Provides look-ahead operations useful in the OxiLean lexer.
Implementations§
Source§impl CharScanner
impl CharScanner
Sourcepub fn peek_at(&self, offset: usize) -> Option<char>
pub fn peek_at(&self, offset: usize) -> Option<char>
Peek at the character offset positions ahead.
Sourcepub fn eat(&mut self, expected: char) -> bool
pub fn eat(&mut self, expected: char) -> bool
Consume the current character if it equals expected.
Auto Trait Implementations§
impl Freeze for CharScanner
impl RefUnwindSafe for CharScanner
impl Send for CharScanner
impl Sync for CharScanner
impl Unpin for CharScanner
impl UnsafeUnpin for CharScanner
impl UnwindSafe for CharScanner
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