Mem_Parser 0.1.0

Zero-copy log parser with mmap input, streaming lines, and optional bump arena AST
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Parse and validation errors with byte offset.

use thiserror::Error;

#[derive(Debug, Clone, PartialEq, Eq, Error)]
pub enum ParseError {
    #[error("invalid UTF-8 at byte offset {byte}")]
    InvalidUtf8 { byte: usize },
    #[error("line starting at byte {line_start} is {len} bytes (max {max})")]
    LineTooLong {
        line_start: usize,
        len: usize,
        max: usize,
    },
}