#[non_exhaustive]pub enum CryptographyError {
InvalidLength(InvalidLength),
InvalidPadding(Error),
Argon2(Error),
}Expand description
Errors that can occur during cryptographic operations
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.
InvalidLength(InvalidLength)
An invalid key length was provided
InvalidPadding(Error)
Data has invalid padding
Argon2(Error)
Errors related to the Argon2 key derivation function
Trait Implementations§
Source§impl Debug for CryptographyError
impl Debug for CryptographyError
Source§impl Display for CryptographyError
impl Display for CryptographyError
Source§impl Error for CryptographyError
impl Error for CryptographyError
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<CryptographyError> for OuterCipherConfigError
impl From<CryptographyError> for OuterCipherConfigError
Source§fn from(source: CryptographyError) -> Self
fn from(source: CryptographyError) -> Self
Converts to this type from the input type.
Source§impl From<CryptographyError> for InnerCipherConfigError
impl From<CryptographyError> for InnerCipherConfigError
Source§fn from(source: CryptographyError) -> Self
fn from(source: CryptographyError) -> Self
Converts to this type from the input type.
Source§impl From<CryptographyError> for DatabaseOpenError
impl From<CryptographyError> for DatabaseOpenError
Source§fn from(source: CryptographyError) -> Self
fn from(source: CryptographyError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for CryptographyError
impl From<Error> for CryptographyError
Source§impl From<Error> for CryptographyError
impl From<Error> for CryptographyError
Source§impl From<InvalidLength> for CryptographyError
impl From<InvalidLength> for CryptographyError
Source§fn from(source: InvalidLength) -> Self
fn from(source: InvalidLength) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CryptographyError
impl RefUnwindSafe for CryptographyError
impl Send for CryptographyError
impl Sync for CryptographyError
impl Unpin for CryptographyError
impl UnsafeUnpin for CryptographyError
impl UnwindSafe for CryptographyError
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