use thiserror::Error; #[derive(Debug, Error)] pub enum Error { #[error("io: {0}")] Io(#[from] std::io::Error), #[error("config: {0}")] Config(String), #[error("not found: {0}")] NotFound(String), #[error("invalid input: {0}")] Invalid(String), #[error(transparent)] Other(#[from] anyhow::Error), } pub type Result = std::result::Result;