pub trait TokenTrait{
// Required method
fn match_char(c: char) -> Option<Self>;
}Expand description
The main trait for Tokens,
it is the automatically implemented by the token attribute macro.
Required Methods§
Sourcefn match_char(c: char) -> Option<Self>
fn match_char(c: char) -> Option<Self>
Returns the enum element that matches the given char.
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.