pub enum EnvelopeError {
Sign(String),
Encrypt(String),
Decrypt(String),
InnerParse(String),
BadVersion(Option<String>),
KindMismatch {
outer: u16,
inner: u16,
},
ChannelMismatch,
EpochMismatch,
BadSignature,
MissingTag(&'static str),
DuplicateTag(&'static str),
NoHeldEpoch,
}Expand description
Errors from sealing or opening a Community message envelope.
Variants§
Sign(String)
Encrypt(String)
Decrypt(String)
InnerParse(String)
BadVersion(Option<String>)
Outer v tag is absent or names a version we don’t speak.
KindMismatch
ChannelMismatch
Inner channel id ≠ the channel whose key decrypted this (cross-channel splice).
EpochMismatch
Inner epoch ≠ the epoch whose key decrypted this (cross-epoch splice/replay).
BadSignature
Inner author signature failed to verify.
MissingTag(&'static str)
DuplicateTag(&'static str)
A binding tag appears more than once — the inner event is ambiguous, so the wire form isn’t deterministic. Any channel-key holder can craft the inner event, so we reject rather than trust first-match.
NoHeldEpoch
The outer z pseudonym matches none of the member’s held epoch keys (an epoch we were never a
recipient of, or a foreign channel). Not ours to read — dropped, not an error condition.
Trait Implementations§
Source§impl Debug for EnvelopeError
impl Debug for EnvelopeError
Source§impl Display for EnvelopeError
impl Display 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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.