pub enum Error {
Parse,
MissingParameters,
NoHeadersFound,
Base64,
NotAligned,
Io(String),
Crypto(CryptoError),
Dns(DnsError),
Dkim(DkimError),
Dkim2(Dkim2Error),
}Expand description
The error type for every fallible operation in this crate.
Verifiers do not return this type directly; they embed it in their result
enums (for example DkimResult::Fail(Error)) to explain why a check did not
pass. Parsers, signers and DNS lookup helpers return it through Result.
Variants§
Parse
A header, DNS record or key could not be parsed.
MissingParameters
A required tag or parameter was missing from a header or record.
NoHeadersFound
None of the headers selected for signing are present in the message, so there is nothing to sign.
Base64
A Base64 value could not be decoded.
NotAligned
An identifier did not align with the domain it had to match (for
example, iprev forward lookups that do not return the client
address, or a DMARC identifier alignment failure).
Io(String)
An I/O error. The string holds the underlying error message.
Crypto(CryptoError)
A signing or verification failure reported by the cryptography backend.
Dns(DnsError)
A DNS lookup failure.
Dkim(DkimError)
A DKIM specific failure (RFC 6376).
Dkim2(Dkim2Error)
A DKIM2 specific failure (draft-ietf-dkim-dkim2-spec).
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()
Source§impl From<Error> for DkimResult
impl From<Error> for DkimResult
Source§impl From<Error> for Dkim2Result
impl From<Error> for Dkim2Result
Source§impl From<Error> for DmarcResult
impl From<Error> for DmarcResult
Source§impl From<Error> for IprevResult
impl From<Error> for IprevResult
Source§impl From<ProtoError> for Error
impl From<ProtoError> for Error
Source§fn from(_: ProtoError) -> Self
fn from(_: ProtoError) -> Self
impl StructuralPartialEq for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more