pub enum Error {
InvalidKey {
context: &'static str,
message: String,
},
InvalidSignature {
context: &'static str,
message: String,
},
DecryptionFailed {
context: &'static str,
message: String,
},
InvalidCiphertext {
context: &'static str,
message: String,
},
InvalidLength {
context: &'static str,
expected: usize,
actual: usize,
},
InvalidParameter {
context: &'static str,
message: String,
},
SerializationError {
context: &'static str,
message: String,
},
RandomGenerationError {
context: &'static str,
message: String,
},
NotImplemented {
feature: &'static str,
},
AuthenticationFailed {
context: &'static str,
message: String,
},
Other {
context: &'static str,
message: String,
},
}
Expand description
Primary error type for cryptographic operations
Variants§
InvalidKey
Invalid key error
InvalidSignature
Invalid signature error
DecryptionFailed
Decryption error
InvalidCiphertext
Invalid ciphertext error
InvalidLength
Invalid length error with context
InvalidParameter
Invalid parameter error
SerializationError
Serialization error
RandomGenerationError
Random generation error
NotImplemented
Not implemented error
AuthenticationFailed
Authentication failed error
Other
Other error
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(_: TryFromSliceError) -> Error
fn from(_: TryFromSliceError) -> Error
Converts to this type from the input type.
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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