pub trait Token<'a, Alphabet>: Sized {
// Required methods
fn content(&'a self) -> &'a str;
fn span(&'a self) -> Span;
fn token(tokenizer: &'a Tokenizer) -> Result<Self, Alphabet>;
fn peek(tokenizer: &'a Tokenizer) -> bool;
}Required Methods§
fn content(&'a self) -> &'a str
fn span(&'a self) -> Span
fn token(tokenizer: &'a Tokenizer) -> Result<Self, Alphabet>
fn peek(tokenizer: &'a Tokenizer) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.