pub enum ArcError {
Show 14 variants
MissingTag(String),
InvalidTag(String),
InvalidCv(String),
InvalidInstance(u32),
UnsupportedAlgorithm(String),
NonContiguousChain {
missing: u32,
},
ChainTooLong(usize),
IncompleteSet {
instance: u32,
missing: &'static str,
},
Dns(String),
InvalidPublicKey(String),
SignatureMismatch {
header: &'static str,
instance: u32,
},
BodyHashMismatch,
InvalidBase64(String),
MalformedMessage,
}Expand description
Errors returned by ARC parsers and the chain verifier.
Variants§
MissingTag(String)
Header value missing a required tag.
InvalidTag(String)
Tag value malformed.
InvalidCv(String)
cv= value not one of none / pass / fail.
InvalidInstance(u32)
i= instance value out of range (must be 1-50 per RFC 8617 §4.2.1).
UnsupportedAlgorithm(String)
a= algorithm not supported.
NonContiguousChain
Sets in a chain are not contiguous from i=1.
ChainTooLong(usize)
Chain has more than 50 sets (RFC 8617 §4.2.1 limit).
IncompleteSet
One of AAR / AMS / AS is missing for an instance number that appeared on another header.
Fields
Dns(String)
DNS lookup for the public key TXT record failed.
InvalidPublicKey(String)
Public-key TXT record present but unparseable.
SignatureMismatch
Cryptographic verification of an AMS or AS failed.
Fields
BodyHashMismatch
AMS body hash (bh=) did not match the recomputed hash of the
canonicalized body.
InvalidBase64(String)
A base64 tag (b= / bh=) failed to decode.
MalformedMessage
The raw message has no detectable end-of-headers terminator (no CRLF CRLF, no LF LF).
Trait Implementations§
Source§impl Error for ArcError
impl Error for ArcError
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()
impl Eq for ArcError
impl StructuralPartialEq for ArcError
Auto Trait Implementations§
impl Freeze for ArcError
impl RefUnwindSafe for ArcError
impl Send for ArcError
impl Sync for ArcError
impl Unpin for ArcError
impl UnsafeUnpin for ArcError
impl UnwindSafe for ArcError
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