Trait FunctionalRecognizer
pub trait FunctionalRecognizer<S>where
S: Copy,{
// Required methods
fn initial(&self) -> S;
fn try_append(&self, state: S, byte: u8) -> Option<S>;
// Provided method
fn get_error(&self, _state: S) -> Option<String> { ... }
}
Required Methods§
fn initial(&self) -> S
fn initial(&self) -> S
Initial state
fn try_append(&self, state: S, byte: u8) -> Option<S>
fn try_append(&self, state: S, byte: u8) -> Option<S>
Extend the recognizer with given byte if allowed.