//! Stable failures. Never include input values or script exception messages. #[derive(Debug, thiserror::Error)] #[error("credential operation failed: {0}")] pub struct Error(pub &'static str); pub type Result = std::result::Result; impl From for Error { fn from(_: rusqlite::Error) -> Self { Self("storage") } } impl From for Error { fn from(_: std::io::Error) -> Self { Self("io") } } impl From for Error { fn from(_: serde_json::Error) -> Self { Self("json") } }