Trait CharSet

Source
pub trait CharSet<C>: Default {
    type TokenKind;
    type Error;

    // Required methods
    fn next_char(&mut self, c: C) -> CharSetResult<Self::TokenKind, Self::Error>;
    fn end_of_input(self) -> Result<Option<Self::TokenKind>, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

fn next_char(&mut self, c: C) -> CharSetResult<Self::TokenKind, Self::Error>

Categorize a charcter while continuing a potential token.

Source

fn end_of_input(self) -> Result<Option<Self::TokenKind>, Self::Error>

What token kind (if any) to return if end of input is reached.

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§