pub struct DkimOutput<'x> { /* private fields */ }Expand description
The verification result of one DKIM1 signature.
MessageAuthenticator::verify_dkim
returns one output per parsed DKIM-Signature header, plus a neutral
output without a signature for each header rejected with an
Error::Dkim error (such as an unsupported algorithm
or version). Headers that fail to parse for other reasons, such as a
missing tag or invalid base64, produce no output. Besides the
DkimResult, it records the parsed signature (when the header could be
parsed), the RFC 6651 failure report address and whether the result comes
from an RFC 6541 ATPS check. Use From<DkimResult> and
with_signature to synthesize an output, for
example in tests or when feeding DMARC, which needs the signature’s d=
domain for alignment.
Implementations§
Source§impl<'x> DkimOutput<'x>
impl<'x> DkimOutput<'x>
Sourcepub fn with_signature(self, signature: &'x Signature) -> Self
pub fn with_signature(self, signature: &'x Signature) -> Self
Attaches the signature this result refers to.
Used to build an output outside the verifier, for example from a
cached result, so that DMARC can check its d= domain for alignment.
Sourcepub fn result(&self) -> &DkimResult
pub fn result(&self) -> &DkimResult
Returns the verification result.
Sourcepub fn signature(&self) -> Option<&Signature>
pub fn signature(&self) -> Option<&Signature>
Returns the parsed signature this result refers to, or None when the
DKIM-Signature header could not be parsed.
Sourcepub fn report_address(&self) -> Option<&str>
pub fn report_address(&self) -> Option<&str>
Returns the address to send an RFC 6651 failure report to.
Set only when the signature has r=y, did not pass, the signer’s
_report._domainkey.<d> record exists, the rp= sampling percentage
selected this failure and the rr= tag requests reports for this kind
of failure. The address is <ra>@<d>.
Trait Implementations§
Source§impl<'x> Clone for DkimOutput<'x>
impl<'x> Clone for DkimOutput<'x>
Source§impl<'x> Debug for DkimOutput<'x>
impl<'x> Debug for DkimOutput<'x>
impl<'x> Eq for DkimOutput<'x>
Source§impl From<DkimResult> for DkimOutput<'_>
impl From<DkimResult> for DkimOutput<'_>
Source§fn from(result: DkimResult) -> Self
fn from(result: DkimResult) -> Self
Source§impl<'x> PartialEq for DkimOutput<'x>
impl<'x> PartialEq for DkimOutput<'x>
impl<'x> StructuralPartialEq for DkimOutput<'x>
Auto Trait Implementations§
impl<'x> Freeze for DkimOutput<'x>
impl<'x> RefUnwindSafe for DkimOutput<'x>
impl<'x> Send for DkimOutput<'x>
impl<'x> Sync for DkimOutput<'x>
impl<'x> Unpin for DkimOutput<'x>
impl<'x> UnsafeUnpin for DkimOutput<'x>
impl<'x> UnwindSafe for DkimOutput<'x>
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