pub enum Error {
Key(KeyError),
Kem(KemError),
Signature(SignatureError),
Symmetric(SymmetricError),
KeyAgreement(KeyAgreementError),
Kdf(KdfError),
}Expand description
The primary error type for the seal-crypto library.
This enum consolidates all possible failures from the underlying cryptographic traits into a single, unified error type.
seal-crypto 库的主要错误类型。
此枚举将来自底层加密 trait 的所有可能失败合并为一个统一的错误类型。
Variants§
Key(KeyError)
An error occurred during a key operation.
在密钥操作期间发生错误。
Kem(KemError)
An error occurred during a Key Encapsulation Mechanism (KEM) operation.
在密钥封装机制 (KEM) 操作期间发生错误。
Signature(SignatureError)
An error occurred during a digital signature operation.
在数字签名操作期间发生错误。
Symmetric(SymmetricError)
An error occurred during a symmetric encryption or decryption operation.
在对称加密或解密操作期间发生错误。
KeyAgreement(KeyAgreementError)
An error occurred during a key agreement operation.
在密钥协商操作期间发生错误。
Kdf(KdfError)
KDF error.
密钥派生函数 (KDF) 错误。
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<KeyAgreementError> for Error
impl From<KeyAgreementError> for Error
Source§fn from(source: KeyAgreementError) -> Self
fn from(source: KeyAgreementError) -> Self
Converts to this type from the input type.
Source§impl From<SignatureError> for Error
impl From<SignatureError> for Error
Source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Converts to this type from the input type.
Source§impl From<SymmetricError> for Error
impl From<SymmetricError> for Error
Source§fn from(source: SymmetricError) -> Self
fn from(source: SymmetricError) -> Self
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