Skip to main content

Tokenizable

Trait Tokenizable 

Source
pub trait Tokenizable {
    // Required method
    fn tokenize(&self) -> Result<Vec<Token<'_>>, TokenError>;
}
Expand description

A datatype that can be tokenized

Required Methods§

Source

fn tokenize(&self) -> Result<Vec<Token<'_>>, TokenError>

Tokenize to a token stream

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<STR> Tokenizable for STR
where STR: AsRef<str>,