pub enum SodiumError {
HexDecodingFailed,
Base64DecodingFailed,
InitializationError,
InvalidKey(String),
InvalidNonce(String),
InvalidInput(String),
AuthenticationError,
EncryptionError(String),
DecryptionError(String),
OperationError(String),
UnsupportedOperation(String),
}
Expand description
Error type for libsodium operations
Variants§
HexDecodingFailed
Hex decoding failed
Base64DecodingFailed
Base64 decoding failed
InitializationError
Initialization of libsodium failed
InvalidKey(String)
Invalid key provided (wrong size or format)
InvalidNonce(String)
Invalid nonce provided (wrong size or format)
InvalidInput(String)
Invalid input data provided
AuthenticationError
Authentication failed during decryption
EncryptionError(String)
Encryption operation failed
DecryptionError(String)
Decryption operation failed
OperationError(String)
Generic operation error
UnsupportedOperation(String)
Operation not supported on this platform or configuration
Trait Implementations§
Source§impl Debug for SodiumError
impl Debug for SodiumError
Source§impl Display for SodiumError
impl Display for SodiumError
Source§impl Error for SodiumError
impl Error for SodiumError
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 SodiumError
impl RefUnwindSafe for SodiumError
impl Send for SodiumError
impl Sync for SodiumError
impl Unpin for SodiumError
impl UnwindSafe for SodiumError
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