TokenRecognizer

Trait TokenRecognizer 

Source
pub trait TokenRecognizer {
    // Required method
    fn recognize_token<S: Into<String>>(input: S) -> Option<Box<dyn Token>>;

    // Provided method
    fn could_match(current: &str, next_char: char) -> bool { ... }
}

Required Methods§

Source

fn recognize_token<S: Into<String>>(input: S) -> Option<Box<dyn Token>>

Provided Methods§

Source

fn could_match(current: &str, next_char: char) -> 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§