pub struct ArcChain {
pub sets: Vec<ArcSet>,
}Expand description
A complete ARC chain extracted from a message.
Fields§
§sets: Vec<ArcSet>Sets in ascending instance order: sets[0].i == 1, etc.
Implementations§
Source§impl ArcChain
impl ArcChain
Sourcepub fn extract(raw_message: &[u8]) -> Result<Option<Self>, ArcError>
pub fn extract(raw_message: &[u8]) -> Result<Option<Self>, ArcError>
Walk the header block of raw_message and assemble every
complete ARC instance into an ArcSet. The header block ends
at the first CRLF CRLF (or LF LF) per RFC 5322 §2.1.
Returns Ok(None) if there are zero ARC headers (the message
is unsigned by any forwarder — DMARC then evaluates as normal).
Returns Err(ArcError::IncompleteSet) if any instance has only
1 or 2 of the 3 required headers, and
Err(ArcError::NonContiguousChain) if instances don’t form a
contiguous run starting at 1.
Sourcepub fn highest_instance(&self) -> u32
pub fn highest_instance(&self) -> u32
Highest instance number in the chain.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArcChain
impl RefUnwindSafe for ArcChain
impl Send for ArcChain
impl Sync for ArcChain
impl Unpin for ArcChain
impl UnsafeUnpin for ArcChain
impl UnwindSafe for ArcChain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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