pub enum XarfError {
InvalidJson(String),
Validation(Vec<ValidationError>),
Schema(String),
V3Conversion(String),
Evidence(String),
}Expand description
Top-level error type for the XARF crate. Returned by parsing, validation, and v3-conversion entry points whose failure modes are fatal.
Variants§
InvalidJson(String)
The input was not syntactically valid JSON (or not a JSON object).
Validation(Vec<ValidationError>)
Schema-validation failure with a structured list of issues. Non-fatal
failures (recoverable into a crate::ParseResult) are exposed as
errors on the result; this variant only surfaces when no result can
be produced.
Schema(String)
A bundled schema failed to parse or compile. This should never happen for a published release of the crate; it indicates a programmer error.
V3Conversion(String)
A v3 report could not be converted to v4 (e.g. unknown ReportType,
missing source identifier, malformed reporter email).
Evidence(String)
Evidence payload encoding/decoding or size-limit failure.
Trait Implementations§
Source§impl Error for XarfError
impl Error for XarfError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()