pub struct Scanner<'a> { /* private fields */ }
Expand description
Scan the input string with byte as the base unit to generate a token stream
Implementations§
Source§impl<'a> Scanner<'a>
impl<'a> Scanner<'a>
pub fn new( input: &'a str, initial_offset: usize, initial_state: ScannerState, emit_pseudo_close_tags: bool, case_sensitive: bool, ) -> Scanner<'a>
pub fn scan(&mut self) -> TokenType
pub fn get_token_type(&self) -> TokenType
pub fn get_token_offset(&self) -> usize
pub fn get_token_length(&self) -> usize
pub fn get_token_end(&self) -> usize
pub fn get_token_text(&self) -> &'a str
pub fn get_scanner_state(&self) -> ScannerState
pub fn get_token_error(&self) -> Option<&'static str>
pub fn get_source_len(&self) -> usize
Auto Trait Implementations§
impl<'a> Freeze for Scanner<'a>
impl<'a> RefUnwindSafe for Scanner<'a>
impl<'a> Send for Scanner<'a>
impl<'a> Sync for Scanner<'a>
impl<'a> Unpin for Scanner<'a>
impl<'a> UnwindSafe for Scanner<'a>
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