pub enum LibolmPickleError {
MissingVersion,
Version(u32, u32),
Base64(Base64DecodeError),
Decryption(DecryptionError),
PublicKey(KeyError),
InvalidSession,
Decode(DecodeError),
Encode(EncodeError),
}
Expand description
Error type describing the various ways libolm pickles can fail to be decoded.
Variants§
MissingVersion
The pickle is missing a valid version.
Version(u32, u32)
The pickle has a unsupported version.
Base64(Base64DecodeError)
The pickle wasn’t valid base64.
Decryption(DecryptionError)
The pickle could not have been decrypted.
PublicKey(KeyError)
The pickle contains an invalid public key.
InvalidSession
The pickle does not contain a valid receiving or sending chain. A valid Olm session needs to have at least one of them.
Decode(DecodeError)
The payload of the pickle could not be decoded.
Encode(EncodeError)
The object could not be encoded as a pickle.
Trait Implementations§
Source§impl Debug for LibolmPickleError
impl Debug for LibolmPickleError
Source§impl Display for LibolmPickleError
impl Display for LibolmPickleError
Source§impl Error for LibolmPickleError
impl Error for LibolmPickleError
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 From<DecodeError> for LibolmPickleError
impl From<DecodeError> for LibolmPickleError
Source§fn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for LibolmPickleError
impl From<DecodeError> for LibolmPickleError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for LibolmPickleError
impl From<EncodeError> for LibolmPickleError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LibolmPickleError
impl !RefUnwindSafe for LibolmPickleError
impl Send for LibolmPickleError
impl Sync for LibolmPickleError
impl Unpin for LibolmPickleError
impl !UnwindSafe for LibolmPickleError
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