#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("http error: {0}")]
Http(String),
#[error("failed to parse release metadata: {0}")]
Parse(String),
#[error("no release asset matched the current platform ({target_os}/{target_arch})")]
NoMatchingAsset {
target_os: &'static str,
target_arch: &'static str,
},
#[error("checksum mismatch: expected {expected}, got {actual}")]
ChecksumMismatch {
expected: String,
actual: String,
},
#[error("signature verification failed: {0}")]
Signature(String),
#[error("verification policy not satisfied: {0}")]
VerificationRequired(String),
#[error("install failed: {0}")]
Install(String),
#[error("update install is not supported on this platform ({0})")]
UnsupportedPlatform(&'static str),
#[error(transparent)]
Io(#[from] std::io::Error),
}
pub type Result<T> = std::result::Result<T, Error>;