pub trait TokenStream {
// Required methods
fn advance(&mut self) -> bool;
fn token(&self) -> &Token;
fn token_mut(&mut self) -> &mut Token;
// Provided methods
fn next(&mut self) -> Option<&Token> { ... }
fn process(&mut self, sink: &mut dyn FnMut(&Token)) { ... }
}Expand description
TokenStream is the result of the tokenization.
It consists consumable stream of Tokens.
Required Methods§
Provided Methods§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".