brinkhaustools/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Errors returned by brinkhaustools components.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("Settings I/O: {0}")]
    SettingsIo(#[from] std::io::Error),

    #[error("JSON: {0}")]
    Json(#[from] serde_json::Error),

    #[error("Logging: {0}")]
    Logging(String),
}

/// Convenience alias for `std::result::Result<T, Error>`.
pub type Result<T> = std::result::Result<T, Error>;