elyze 1.5.5

Elyze is an extensible general purpose framework parser allowing to parser any type of data without allocation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Provides the `Match` trait.

/// Describes a matchable object.
pub trait Match<T> {
    /// 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
    fn is_matching(&self, data: &[T]) -> (bool, usize);
    /// Returns the size of the matchable object.
    fn size(&self) -> usize;
}