marque-core 0.2.0

Format-agnostic scanner and parser for IC classification markings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use marque_ism::Span;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum CoreError {
    #[error("malformed marking: {0:?}")]
    MalformedMarking(String),

    #[error("unrecognized token at offset {offset}: {token:?}")]
    UnrecognizedToken { token: String, offset: usize },

    #[error("invalid UTF-8 in span {0:?}")]
    InvalidUtf8(Span),

    #[error("empty source buffer")]
    EmptySource,
}