Skip to main content

ImplementationError

Enum ImplementationError 

Source
pub enum ImplementationError {
    ImpossibleSfvError(Error),
    ParsingError(String),
    LookupError(CoveredComponent),
    UnsupportedAlgorithm(Algorithm),
    NoSuchKey,
    InvalidKeyLength,
    InvalidSignatureLength,
    FailedToVerify(SignatureError),
    NonAsciiContentFound,
    SignatureParamsSerialization,
    WebBotAuth(WebBotAuthError),
}
Expand description

Errors that may be thrown by this module.

Variants§

§

ImpossibleSfvError(Error)

Errors that arise from invalid conversions from parsed structs back into structured field values, nominally “impossible” because the structs are already in a valid state.

§

ParsingError(String)

Errors that arise from conversions of structured field values into parsed structs, with an explanation of what wrong.

§

LookupError(CoveredComponent)

Errors raised when trying to get the value of a covered component fails from a SignedMessage or UnsignedMessage, likely because the message did not contain the value.

§

UnsupportedAlgorithm(Algorithm)

Errors raised when an incoming message references an algorithm that isn’t currently supported by this implementation. The subset of registered IANA signature algorithms implemented here is provided by Algorithms struct.

§

NoSuchKey

An attempt to resolve key identifier to a valid public key failed. This prevents message verification.

§

InvalidKeyLength

The resolved key ID did not have the sufficient length to be parsed as a valid key for the algorithm chosen.

§

InvalidSignatureLength

The signature provided in Signature header was not long enough to be a valid signature for the algorithm chosen.

§

FailedToVerify(SignatureError)

Verification of a parsed signature against a resolved key failed, indicating the signature was invalid.

§

NonAsciiContentFound

A valid signature base must contain only ASCII characters; this error is thrown if that’s not the case. This may be thrown if some of the headers included in covered components contained non-ASCII characters, for example. This will be thrown during both signing and verification, as both steps require constructing the signature base.

§

SignatureParamsSerialization

Signature bases are terminated with a line beginning with @signature-params. This error is thrown if the value of that line could not be converted into a structured field value. This is considered “impossible” as invalid values should not be present in the structure containing those values.

§

WebBotAuth(WebBotAuthError)

A wrapper around WebBotAuthError

Trait Implementations§

Source§

impl Debug for ImplementationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ImplementationError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ImplementationError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.