pub enum Error {
Show 25 variants
Encode(String),
Decode(String),
InvalidKey(String),
Random,
Invalid {
what: &'static str,
reason: String,
},
WrongDomain {
expected: Domain,
found: Domain,
},
Threshold {
domain: Domain,
found: usize,
needed: usize,
},
PinMismatch,
RootVersion {
current: u32,
found: u32,
},
RootOrg,
Expired(Domain),
WrongTarget {
expected: String,
found: String,
},
Replay {
last: u64,
found: u64,
},
Equivocation(u64),
Revoked(String),
KnownBad(String),
FreshnessMismatch,
FreshnessRequired,
Downgrade {
installed: String,
offered: String,
},
BaseMismatch(String),
ClientVersion(String),
NotDelegated(String),
UnsupportedKind(&'static str),
File {
path: String,
reason: String,
},
Rule(String),
}Expand description
Everything that can go wrong while building, signing or checking update metadata.
Variants§
Encode(String)
CBOR encoding failed.
Decode(String)
CBOR decoding failed or the input was malformed.
InvalidKey(String)
A key, signature or hash could not be parsed, or is weak.
Random
The OS random generator failed.
Invalid
A record is structurally invalid (empty ids, bad thresholds, bad paths, limits).
WrongDomain
An envelope was signed for a different purpose.
Threshold
Too few distinct trusted keys signed.
Fields
PinMismatch
The root’s keys do not hash to the fingerprint compiled into the app.
RootVersion
A root update does not follow the trusted root.
RootOrg
A root update names a different org.
Expired(Domain)
A record has expired (or is not valid yet).
WrongTarget
The record is for a different app or channel than the caller asked for.
Replay
The sequence number is not above the last one seen (replay or rollback).
Equivocation(u64)
Two different manifests claim the same seq.
Revoked(String)
The update is listed as revoked by a trusted freshness record.
KnownBad(String)
The update failed its boot-health check on this device before.
FreshnessMismatch
The freshness record names another manifest.
FreshnessRequired
The root trusts timestamp keys but no valid freshness record came with the manifest.
Downgrade
A lower version without a rollback record.
BaseMismatch(String)
The installed base release is not one the update applies to.
ClientVersion(String)
The running client version is outside the update’s range.
NotDelegated(String)
The release key is not delegated for this app or channel, or its delegation expired.
UnsupportedKind(&'static str)
This client does not accept the update kind.
File
A downloaded file failed its size or hash check.
Rule(String)
A targeting rule is invalid.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()