buf_read_splitter 0.3.1

Stream reader with capacity to split(stop) the stream on a defined pattern (usually &[u8] but can also more complex pattern)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
///
/// Used by a matcher, returning the result of the search of one character
#[derive(Clone)]
pub enum MatchResult {
    ///
    /// Not matched
    Mismatch,
    ///
    /// This char match the position, need a next one to define if match or not
    NeedNext,
    ///
    /// Matched. Arguments are : ( size to take to right , size_to_take_to_the_left )
    Match(usize, usize),
}