pub enum Error {
CryptoError(Error),
OsError(OsError),
FormatError(FormatError),
}Expand description
Main error type for the seal-crypto-wrapper library.
seal-crypto-wrapper 库的主要错误类型。
This enum encompasses all possible errors that can occur during cryptographic operations. Each variant provides specific context about the failure mode.
此枚举包含密码操作期间可能发生的所有错误。 每个变体都提供有关失败模式的特定上下文。
Variants§
CryptoError(Error)
Errors from the underlying cryptographic library.
来自底层密码库的错误。
These include algorithm-specific failures such as:
- Key generation failures
- Encryption/decryption errors
- Signature verification failures
- Invalid algorithm parameters
这些包括算法特定的失败,例如:
- 密钥生成失败
- 加密/解密错误
- 签名验证失败
- 无效的算法参数
OsError(OsError)
Operating system related errors.
操作系统相关错误。
Typically occurs during:
- Random number generation
- System resource allocation
- Hardware security module access
通常发生在:
- 随机数生成
- 系统资源分配
- 硬件安全模块访问
FormatError(FormatError)
Data format and serialization errors.
数据格式和序列化错误。
Covers issues with:
- Key serialization/deserialization
- Ciphertext format validation
- Algorithm parameter encoding
涵盖以下问题:
- 密钥序列化/反序列化
- 密文格式验证
- 算法参数编码
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<FormatError> for Error
impl From<FormatError> for Error
Source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
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