Skip to main content

qualifier/
lib.rs

1pub mod annotation;
2pub mod compact;
3pub mod content_hash;
4pub mod qual_file;
5
6#[cfg(feature = "cli")]
7pub mod cli;
8
9/// Library-wide error type.
10#[derive(Debug, thiserror::Error)]
11pub enum Error {
12    #[error("I/O error: {0}")]
13    Io(#[from] std::io::Error),
14
15    #[error("JSON error: {0}")]
16    Json(#[from] serde_json::Error),
17
18    #[error("cycle detected in {context}: {detail}")]
19    Cycle { context: String, detail: String },
20
21    #[error("{0}")]
22    Validation(String),
23}
24
25/// Library-wide result type.
26pub type Result<T> = std::result::Result<T, Error>;