pub enum EncryptionError {
InvalidAccess,
Operation,
Generic(Error),
}
Expand description
Errors that can occur during encryption operations.
These errors map to the exceptions defined in the Web Crypto API specification for encryption operations.
Variants§
InvalidAccess
Indicates that the requested operation is not valid for the provided key. This typically occurs when:
- The key doesn’t support the encryption operation
- The key’s algorithm doesn’t match the specified algorithm
- The key’s usages don’t include “encrypt”
Operation
Indicates that the operation failed for an algorithm-specific reason. This can occur when:
- The input data is too large
- The algorithm parameters are invalid
- There’s an internal error in the cryptographic implementation
Generic(Error)
A wrapper for other types of errors that may occur during encryption
Trait Implementations§
Source§impl Clone for EncryptionError
impl Clone for EncryptionError
Source§fn clone(&self) -> EncryptionError
fn clone(&self) -> EncryptionError
Returns a copy of the value. Read more
1.0.0 · 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 EncryptionError
impl Debug for EncryptionError
Source§impl Display for EncryptionError
impl Display for EncryptionError
Source§impl Error for EncryptionError
impl Error for EncryptionError
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<Error> for EncryptionError
impl From<Error> for EncryptionError
Auto Trait Implementations§
impl Freeze for EncryptionError
impl RefUnwindSafe for EncryptionError
impl Send for EncryptionError
impl Sync for EncryptionError
impl Unpin for EncryptionError
impl UnwindSafe for EncryptionError
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