#[non_exhaustive]pub enum Error {
Parse(ParseError),
Unsupported(UnsupportedError),
Trust(TrustError),
Certificate(CertificateError),
Transparency(TransparencyError),
Timestamp(TimestampError),
ContentBinding(ContentBindingError),
Policy(PolicyError),
ResourceLimit(ResourceLimitError),
}Expand description
Top-level error type for this crate.
Each variant corresponds to one stage of parsing or (eventually)
verification. The taxonomy is intentionally mechanical: it says what
check failed, not what an attacker may have intended (no Tampered
variant, no inferred staleness).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parse(ParseError)
A parser rejected malformed or non-conforming input.
Unsupported(UnsupportedError)
The input uses a format, media type, or version this crate does not (yet) support.
Trust(TrustError)
A trust-root or trust-material check failed.
Certificate(CertificateError)
An X.509 certificate failed validation.
Transparency(TransparencyError)
A transparency-log (Rekor) check failed.
Timestamp(TimestampError)
An RFC 3161 timestamp check failed.
ContentBinding(ContentBindingError)
The subject digest did not bind to the signed statement.
Policy(PolicyError)
The caller’s identity policy was not satisfied.
ResourceLimit(ResourceLimitError)
An input exceeded a hard-coded resource limit.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CertificateError> for Error
impl From<CertificateError> for Error
Source§fn from(source: CertificateError) -> Self
fn from(source: CertificateError) -> Self
Converts to this type from the input type.
Source§impl From<ContentBindingError> for Error
impl From<ContentBindingError> for Error
Source§fn from(source: ContentBindingError) -> Self
fn from(source: ContentBindingError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<PolicyError> for Error
impl From<PolicyError> for Error
Source§fn from(source: PolicyError) -> Self
fn from(source: PolicyError) -> Self
Converts to this type from the input type.
Source§impl From<ResourceLimitError> for Error
impl From<ResourceLimitError> for Error
Source§fn from(source: ResourceLimitError) -> Self
fn from(source: ResourceLimitError) -> Self
Converts to this type from the input type.
Source§impl From<TimestampError> for Error
impl From<TimestampError> for Error
Source§fn from(source: TimestampError) -> Self
fn from(source: TimestampError) -> Self
Converts to this type from the input type.
Source§impl From<TransparencyError> for Error
impl From<TransparencyError> for Error
Source§fn from(source: TransparencyError) -> Self
fn from(source: TransparencyError) -> Self
Converts to this type from the input type.
Source§impl From<TrustError> for Error
impl From<TrustError> for Error
Source§fn from(source: TrustError) -> Self
fn from(source: TrustError) -> Self
Converts to this type from the input type.
Source§impl From<UnsupportedError> for Error
impl From<UnsupportedError> for Error
Source§fn from(source: UnsupportedError) -> Self
fn from(source: UnsupportedError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more