Token

Trait Token 

Source
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§

Source

fn content(&'a self) -> &'a str

Source

fn span(&'a self) -> Span

Source

fn token(tokenizer: &'a Tokenizer) -> Result<Self, Alphabet>

Source

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.

Implementors§