pub enum KeychainError {
Show 14 variants
InvalidKey,
InvalidReason,
TooLarge,
NotFound,
NeedsPresence,
Cancelled,
AuthFailed,
Lockout,
PasscodeNotSet,
Unreadable,
Locked,
Unavailable,
Unsupported,
Platform(String),
}Expand description
Why a call did not do what it was asked.
Variants§
InvalidKey
The key is empty, longer than MAX_KEY_LEN bytes, or contains a control character.
InvalidReason
The reason text for a user-presence read is empty.
TooLarge
The secret is longer than MAX_SECRET_LEN bytes.
NotFound
No item has this key.
NeedsPresence
The item needs the person present and this was the synchronous get; use
get_async or get_future.
Cancelled
The person dismissed the verification dialog.
AuthFailed
The person did not pass the verification dialog.
Lockout
Biometrics are locked after too many attempts; the device credential clears it.
PasscodeNotSet
The item needs a device passcode, PIN or password and none is set.
Unreadable
The item exists but cannot be read: its key was invalidated (the device credential was
removed, a protected key’s biometric enrollment changed), its file is damaged, or it was
written by another user account. The item is left in place; remove clears it.
Locked
The store is locked and cannot be unlocked now: a Linux keyring whose unlock dialog was dismissed, an Apple item read while the device is locked.
The store is not reachable: no Secret Service on this Linux session, no logon session on Windows, no app context on Android.
Unsupported
This platform has no store, or this Protection level has no realization here.
Platform(String)
A platform error outside the vocabulary above, with the platform’s message.
Trait Implementations§
Source§impl Clone for KeychainError
impl Clone for KeychainError
Source§fn clone(&self) -> KeychainError
fn clone(&self) -> KeychainError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KeychainError
impl Debug for KeychainError
Source§impl Display for KeychainError
impl Display for KeychainError
impl Eq for KeychainError
Source§impl Error for KeychainError
impl Error for KeychainError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()