pub trait Tokens {
type Error;
// Required methods
fn peek(
&mut self,
) -> Result<Meta<Option<&Token>, Span>, Meta<Self::Error, Span>>;
fn next(
&mut self,
) -> Result<Meta<Option<Token>, Span>, Meta<Self::Error, Span>>;
fn last(&self) -> Span;
}Expand description
Fallible tokens iterator with lookahead.
Required Associated Types§
Required Methods§
fn peek( &mut self, ) -> Result<Meta<Option<&Token>, Span>, Meta<Self::Error, Span>>
fn next(&mut self) -> Result<Meta<Option<Token>, Span>, Meta<Self::Error, Span>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".