use thiserror::Error; #[derive(Debug, Error)] pub enum Error { #[error("sqlite: {0}")] Sqlite(#[from] rusqlite::Error), #[error("io: {0}")] Io(#[from] std::io::Error), #[error("json: {0}")] Json(#[from] serde_json::Error), #[error("not found: {0}")] NotFound(String), #[error("conflict: {0}")] Conflict(String), #[error("invalid: {0}")] Invalid(String), } pub type Result = std::result::Result;