pub enum DecryptionError {
CiphertextTooShort,
AuthenticationFailed,
DeserializationFailed(DeserializationError),
}Expand description
Errors during decryption.
Variants§
CiphertextTooShort
Ciphertext (which should be prepended by the nonce) is shorter than the nonce length.
AuthenticationFailed
The ciphertext and the attached authentication data are inconsistent. This can happen if:
- an incorrect key is used,
- the ciphertext is modified or cut short,
- an incorrect authentication data is provided on decryption.
DeserializationFailed(DeserializationError)
Unable to create object from decrypted ciphertext
Trait Implementations§
Source§impl Debug for DecryptionError
impl Debug for DecryptionError
Auto Trait Implementations§
impl Freeze for DecryptionError
impl RefUnwindSafe for DecryptionError
impl Send for DecryptionError
impl Sync for DecryptionError
impl Unpin for DecryptionError
impl UnwindSafe for DecryptionError
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
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>
Converts
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>
Converts
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