#[non_exhaustive]pub enum DecryptionError {
ChaCha(Error),
Decompression(DecompressionError),
Ecc(DecodeError),
Hash(HashError),
KeyMismatch,
}Expand description
Errors returned by decrypt.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ChaCha(Error)
Returned if ChaCha20-Poly1305 rejects the ciphertext or key.
Decompression(DecompressionError)
Returned if decompression fails or the output would exceed the key’s length bound.
Ecc(DecodeError)
Returned if ECC decoding fails.
Hash(HashError)
Returned if hashing the decrypted data fails.
KeyMismatch
Returned if the decrypted data does not hash to the decryption key.
Trait Implementations§
Source§impl Clone for DecryptionError
impl Clone for DecryptionError
Source§fn clone(&self) -> DecryptionError
fn clone(&self) -> DecryptionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecryptionError
impl Debug for DecryptionError
Source§impl Display for DecryptionError
impl Display for DecryptionError
Source§impl Error for DecryptionError
impl Error for DecryptionError
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 DecryptionError
impl From<DecodeError> for DecryptionError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<DecompressionError> for DecryptionError
impl From<DecompressionError> for DecryptionError
Source§fn from(source: DecompressionError) -> Self
fn from(source: DecompressionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DecryptionError
impl RefUnwindSafe for DecryptionError
impl Send for DecryptionError
impl Sync for DecryptionError
impl Unpin for DecryptionError
impl UnsafeUnpin 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