pub enum EnvelopeError {
Signature(VerifyError),
UnknownKind(String),
Malformed(String),
MissingRecipient,
Misaddressed {
target: String,
},
MissingExpiry,
MalformedExpiry(String),
ClockAhead {
ahead_ms: i128,
},
Reversed,
OverCeiling {
validity_ms: i128,
},
Expired {
deadline: DateTime<Utc>,
},
KeyAgeExceeded {
kid: String,
age_ms: i128,
max_age_ms: i128,
},
}Expand description
Why an envelope was not accepted. Each variant is a distinct operational state; the clock ones are kept apart from signature failures on purpose.
Variants§
Signature(VerifyError)
The signature did not verify (or there was none).
UnknownKind(String)
A kind this build does not recognise.
Malformed(String)
The body is not a well-formed envelope.
MissingRecipient
No target_pc_id.
Misaddressed
Addressed to a different host.
MissingExpiry
No expires_at.
MalformedExpiry(String)
expires_at is not an RFC 3339 timestamp.
ClockAhead
Signed further in the future than the allowance: the clocks disagree.
Reversed
expires_at is before the signing time.
OverCeiling
The validity window exceeds MAX_ENVELOPE_VALIDITY.
Expired
The effective start deadline has passed.
KeyAgeExceeded
The signing key’s own freshness bound has passed.
Implementations§
Trait Implementations§
Source§impl Clone for EnvelopeError
impl Clone for EnvelopeError
Source§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display for EnvelopeError
impl Eq for EnvelopeError
Source§impl Error for EnvelopeError
impl Error for EnvelopeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for EnvelopeError
impl PartialEq for EnvelopeError
impl StructuralPartialEq for EnvelopeError
Auto Trait Implementations§
impl Freeze for EnvelopeError
impl RefUnwindSafe for EnvelopeError
impl Send for EnvelopeError
impl Sync for EnvelopeError
impl Unpin for EnvelopeError
impl UnsafeUnpin for EnvelopeError
impl UnwindSafe for EnvelopeError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§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
Compare self to
key and return true if they are equal.