Skip to main content

Token

Trait Token 

Source
pub trait Token {
    type Tag: Display + PartialEq;

    // Required methods
    fn tag(&self) -> Self::Tag;
    fn lexeme(&self) -> &str;
}

Required Associated Types§

Required Methods§

Source

fn tag(&self) -> Self::Tag

Source

fn lexeme(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§