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
use elyze::scanner::Scanner;

fn process(mut scanner: Scanner<'_, u8>) -> &[u8] {
    // do something with the data
    // then bump the scanner
    scanner.bump_by(3);
    // return the remaining
    scanner.remaining()
}

fn main() {
    let data = b"hello world";
    let remaining = process(Scanner::new(data));
    assert_eq!(remaining, b"lo world");
}