#[derive(Debug, thiserror::Error)]
pub enum ScrybeError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("serialization error: {0}")]
Serde(#[from] serde_json::Error),
#[error("CBOR encoding error: {0}")]
Cbor(String),
#[error("{0}")]
Other(String),
}
impl ScrybeError {
pub fn msg(msg: impl std::fmt::Display) -> Self {
Self::Other(msg.to_string())
}
}
pub type Result<T> = std::result::Result<T, ScrybeError>;