Struct AnythingGoes

Source
pub struct AnythingGoes;

Trait Implementations§

Source§

impl Recognizer for AnythingGoes

Source§

fn collapse(&mut self)

“Collapse” the stack so that it consists only of its former top element. X = stack.top(); stack.empty(); stack.push(X)
Source§

fn trie_finished(&mut self)

Called when iteration over the trie is finished Stack has exactly one element then, except when iteration started from non-root node. In that case, the stack may have more than one element, and trie_finished() needs to pop the excessive elements.
Source§

fn pop_bytes(&mut self, _num: usize)

for _ in 0..num { stack.pop() }
Source§

fn try_push_byte(&mut self, _byte: u8) -> bool

This combines push_byte and byte_allowed into one function for performance.
Source§

fn byte_allowed(&mut self, byte: u8) -> bool

check if stack.top() transitions via byte to a viable state
Source§

fn trie_started(&mut self, _dbg_lbl: &str)

Called when iteration over the trie is started
Source§

fn get_error(&mut self) -> Option<String>

Check if there are any errors to be reported to the user.
Source§

fn save_stats(&mut self, _nodes_walked: usize)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.