pub enum EncryptError {
InvalidKey,
EncryptionFailed,
DecryptionFailed,
InvalidPayload,
Base64Error(String),
Utf8Error(String),
}Expand description
Encryption errors. 加密错误。
Variants§
InvalidKey
Invalid encryption key. / 无效加密密钥。
EncryptionFailed
Encryption operation failed. / 加密操作失败。
DecryptionFailed
Decryption failed due to wrong password or corrupted data. / 解密失败,密码错误或数据损坏。
InvalidPayload
Payload is too short to contain nonce and ciphertext. / 载荷过短,无法包含 nonce 和密文。
Base64Error(String)
Base64 encoding/decoding error. / Base64 编解码错误。
Utf8Error(String)
UTF-8 encoding error. / UTF-8 编码错误。
Trait Implementations§
Source§impl Debug for EncryptError
impl Debug for EncryptError
Source§impl Display for EncryptError
impl Display for EncryptError
Source§impl Error for EncryptError
impl Error for EncryptError
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()
Auto Trait Implementations§
impl Freeze for EncryptError
impl RefUnwindSafe for EncryptError
impl Send for EncryptError
impl Sync for EncryptError
impl Unpin for EncryptError
impl UnsafeUnpin for EncryptError
impl UnwindSafe for EncryptError
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