pub enum MegolmError {
EventError(EventError),
JsonError(Error),
MissingRoomKey(Option<WithheldCode>),
MismatchedIdentityKeys(MismatchedIdentityKeysError),
Decode(DecodeError),
Decryption(DecryptionError),
Store(CryptoStoreError),
SenderIdentityNotTrusted(VerificationLevel),
}
Expand description
Error representing a failure during a group encryption operation.
Variants§
EventError(EventError)
The event that should have been decrypted is malformed.
JsonError(Error)
The received decrypted event couldn’t be deserialized.
MissingRoomKey(Option<WithheldCode>)
Decryption failed because we’re missing the room key that was used to encrypt the event.
MismatchedIdentityKeys(MismatchedIdentityKeysError)
Decryption failed because of a mismatch between the identity keys of the device we received the room key from and the identity keys recorded in the plaintext of the room key to-device message.
Decode(DecodeError)
The encrypted megolm message couldn’t be decoded.
Decryption(DecryptionError)
The event could not have been decrypted.
Store(CryptoStoreError)
The storage layer returned an error.
SenderIdentityNotTrusted(VerificationLevel)
An encrypted message wasn’t decrypted, because the sender’s
cross-signing identity did not satisfy the requested
crate::TrustRequirement
.
The nested value is the sender’s current verification level.
Trait Implementations§
Source§impl Debug for MegolmError
impl Debug for MegolmError
Source§impl Display for MegolmError
impl Display for MegolmError
Source§impl Error for MegolmError
impl Error for MegolmError
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
Source§impl From<CryptoStoreError> for MegolmError
impl From<CryptoStoreError> for MegolmError
Source§fn from(source: CryptoStoreError) -> Self
fn from(source: CryptoStoreError) -> Self
Source§impl From<DecodeError> for MegolmError
impl From<DecodeError> for MegolmError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<DecryptionError> for MegolmError
impl From<DecryptionError> for MegolmError
Source§fn from(source: DecryptionError) -> Self
fn from(source: DecryptionError) -> Self
Source§impl From<Error> for MegolmError
impl From<Error> for MegolmError
Source§fn from(source: SerdeError) -> Self
fn from(source: SerdeError) -> Self
Source§impl From<EventError> for MegolmError
impl From<EventError> for MegolmError
Source§fn from(source: EventError) -> Self
fn from(source: EventError) -> Self
Auto Trait Implementations§
impl Freeze for MegolmError
impl !RefUnwindSafe for MegolmError
impl Send for MegolmError
impl Sync for MegolmError
impl Unpin for MegolmError
impl !UnwindSafe for MegolmError
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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