pub enum KeyError {
Show 20 variants
DeviceIdEncoding,
StoreClosed,
File(FileError),
Crypto(CryptoError),
Material(MaterialError),
PassphraseAuthentication,
PassphraseHeader,
PassphraseParameters,
Unavailable(Box<dyn Error + Sync + Send>),
Keychain(KeychainError),
KeychainTemporarilyUnavailable(KeychainError),
MissingKeychainEntitlement(KeychainError),
InvalidServiceName,
Unsupported,
SavedEntriesFull,
SavedEntryTooLarge,
Left,
RestoreCodeStoreId,
Shutdown(Shutdown),
Bug(Bug),
}Expand description
A failure unlocking, keeping or forgetting keys or host secrets (E11).
Variants§
DeviceIdEncoding
The device-only installation id is malformed.
StoreClosed
The handle that owns this custody has closed.
File(FileError)
A filesystem operation failed; the cause says whether bytes changed.
Crypto(CryptoError)
A cryptographic service was unavailable or stored bytes failed validation.
Material(MaterialError)
Decrypted or keychain-provided material was malformed.
PassphraseAuthentication
A wrong passphrase or altered file failed authentication.
PassphraseHeader
The passphrase file’s header was malformed or unsupported.
PassphraseParameters
Recorded Argon2id parameters exceed the accepted resource bounds.
The device lacks resources needed to unlock or keep keys.
Keychain(KeychainError)
The OS credential store refused an operation.
Custody cannot be accessed right now, but the same call succeeds once the session unlocks: native NoStorageAccess, or on Apple errSecInteractionNotAllowed (OSStatus -25308), which a locked device, a sleeping display or a session that can’t show UI answers (§12.4). The native cause says why access was denied.
MissingKeychainEntitlement(KeychainError)
Apple’s errSecMissingEntitlement (OSStatus -34018): the app has no keychain-access-groups entitlement backed by a provisioning profile. Every keychain call fails the same way until the app is signed with one; retrying changes nothing.
InvalidServiceName
The service name is empty or contains a NUL.
Unsupported
The person’s entries need iCloud Keychain or Block Store: Apple platforms, or an Android phone with Google Play services.
SavedEntriesFull
Block Store already holds its 16 entries for the app, so a new entry can’t be saved (§13.1). Forgetting a saved code makes room.
SavedEntryTooLarge
A saved code doesn’t fit in Block Store’s 1,024 bytes for an entry, even with the store’s name shortened (§13.1).
Left
The person left the store, so their saved entries stay deleted (§14.1).
RestoreCodeStoreId
A saved restore-code account’s id part is not a store id as coven writes it.
Shutdown(Shutdown)
The call’s runtime is shutting down and dropped it partway, so what it changed in custody is unknown (E15).
Bug(Bug)
The call’s custody work panicked: a bug, which the caller reports (E15). What it changed in custody is unknown.
Trait Implementations§
Source§impl CarriesBug for KeyError
impl CarriesBug for KeyError
Source§impl Error for KeyError
impl Error for KeyError
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
Source§impl From<CryptoError> for KeyError
impl From<CryptoError> for KeyError
Source§fn from(source: CryptoError) -> KeyError
fn from(source: CryptoError) -> KeyError
Source§impl From<KeyError> for BootstrapError
impl From<KeyError> for BootstrapError
Source§impl From<KeyError> for CovenError
impl From<KeyError> for CovenError
Source§impl From<KeyError> for IdentityError
impl From<KeyError> for IdentityError
Source§fn from(error: KeyError) -> IdentityError
fn from(error: KeyError) -> IdentityError
Source§impl From<KeyError> for StorageSetupError
impl From<KeyError> for StorageSetupError
Source§impl From<KeyError> for StoreDeletionError
impl From<KeyError> for StoreDeletionError
Source§impl From<KeyError> for StoreKeyUnlockError
impl From<KeyError> for StoreKeyUnlockError
Source§impl From<KeychainError> for KeyError
impl From<KeychainError> for KeyError
Source§fn from(error: KeychainError) -> KeyError
fn from(error: KeychainError) -> KeyError
Source§impl From<MaterialError> for KeyError
impl From<MaterialError> for KeyError
Source§fn from(source: MaterialError) -> KeyError
fn from(source: MaterialError) -> KeyError
Source§impl From<TaskFailed> for KeyError
impl From<TaskFailed> for KeyError
Source§fn from(failed: TaskFailed) -> KeyError
fn from(failed: TaskFailed) -> KeyError
Auto Trait Implementations§
impl Freeze for KeyError
impl !RefUnwindSafe for KeyError
impl Send for KeyError
impl Sync for KeyError
impl Unpin for KeyError
impl UnsafeUnpin for KeyError
impl !UnwindSafe for KeyError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more