#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error(
"invalid protocol name `{name}`: a scheme must start with a letter \
and contain only letters, digits, `+`, `-` or `.`"
)]
InvalidProtocolName { name: String },
#[error("invalid backup file: {0}")]
InvalidBackup(String),
#[error("administrator privileges are required to modify the registry: {0}")]
ElevationRequired(String),
}
pub type Result<T> = std::result::Result<T, Error>;