Match

Trait Match 

Source
pub trait Match<T> {
    // Required method
    fn matcher(&self, data: &[T]) -> (bool, usize);
}
Expand description

Describes a matchable object.

Required Methods§

Source

fn matcher(&self, data: &[T]) -> (bool, usize)

Returns true if the data matches the pattern.

§Arguments

data - the data to match

§Returns

(true, index) if the data matches the pattern, (false, index) otherwise

Implementors§

Source§

impl Match<u8> for Token

Source§

impl Match<u8> for TokenNumber

Implement the Match trait for the token number.