#[non_exhaustive]pub enum KeysError {
WrongPassphrase,
WrongKey,
WrongUnlocker,
NoSecrets,
Keystore(Error),
Crypto(CryptoError),
Damaged(String),
Io(Error),
}Expand description
Why keys could not be unlocked or saved.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WrongPassphrase
The passphrase does not open the compartment, or the file was changed.
WrongKey
The keystore’s key does not open the compartment, or the file was changed.
WrongUnlocker
The compartment is protected another way than the unlocker offers.
NoSecrets
The key file has no secrets compartment.
Keystore(Error)
The platform’s keystore failed or does not have the key.
Crypto(CryptoError)
The passphrase cannot be used.
Damaged(String)
The key file is not well-formed.
Io(Error)
The file system failed.
Trait Implementations§
Source§impl Error for KeysError
impl Error for KeysError
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<CryptoError> for KeysError
impl From<CryptoError> for KeysError
Source§fn from(source: CryptoError) -> KeysError
fn from(source: CryptoError) -> KeysError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for KeysError
impl !UnwindSafe for KeysError
impl Forget for KeysError
impl Freeze for KeysError
impl Move for KeysError
impl Send for KeysError
impl Sync for KeysError
impl Unpin for KeysError
impl UnsafeUnpin for KeysError
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