#[non_exhaustive]pub enum StatusError {
Unsupported(String),
Unavailable {
uri: String,
reason: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
InvalidList {
uri: String,
reason: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
UnresolvedKey {
uri: String,
key: String,
source: KeyResolutionError,
},
Expired {
uri: String,
expired_at: DateTime<Utc>,
now: DateTime<Utc>,
},
IndexOutOfRange {
uri: String,
idx: u64,
len: usize,
},
Invalid(String),
}vc only.Expand description
Why a StatusCheck did not pass.
The variants tell apart what a caller may want to handle differently: an
Unavailable list may be fetched on a later attempt, an
Expired one may be valid once its provider has refreshed it, and an
UnresolvedKey depends on why the resolver failed, which its source
says. An InvalidList or an
IndexOutOfRange will not pass by trying again.
Where a variant has a source, Error::source returns it,
and the message ends with it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported(String)
The check does not understand the status type.
The status list could not be fetched: the request failed, the server answered with an error status, or the check refused a redirect. The source is the client’s error, when there is one.
InvalidList
The reference or the status list is not one the check can read or trust: a URI that is
not a URL, a body that is not a status list token, a sub other than the URI, a
signature that does not verify, a key that is not the issuer’s. The source is the
underlying error, when there is one.
Fields
UnresolvedKey
The key that signed the status list could not be resolved; the source is the resolver’s error.
Fields
source: KeyResolutionErrorThe resolver’s error.
Expired
The status list has expired.
Fields
IndexOutOfRange
The credential’s index is beyond the end of the status list.
Fields
Invalid(String)
The credential’s status makes it unusable: revoked, suspended, …
Trait Implementations§
Source§impl Debug for StatusError
impl Debug for StatusError
Source§impl Display for StatusError
impl Display for StatusError
Source§impl Error for StatusError
impl Error for StatusError
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()