pub trait Scanner {
// Required methods
fn check_token(&self) -> bool;
fn peek_token(&self) -> Result<Option<&Token>>;
fn get_token(&mut self) -> Result<Option<Token>>;
fn reset(&mut self);
fn position(&self) -> Position;
fn input(&self) -> &str;
}Expand description
Trait for YAML scanners that convert character streams to tokens
Required Methods§
Sourcefn check_token(&self) -> bool
fn check_token(&self) -> bool
Check if there are more tokens available
Sourcefn peek_token(&self) -> Result<Option<&Token>>
fn peek_token(&self) -> Result<Option<&Token>>
Peek at the next token without consuming it