Skip to main content

KeyError

Enum KeyError 

Source
pub enum KeyError {
Show 20 variants DeviceIdEncoding, StoreClosed, File(FileError), Crypto(CryptoError), Material(MaterialError), PassphraseAuthentication, PassphraseHeader, PassphraseParameters, Unavailable(Box<dyn Error + Send + Sync>), 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.

§

Unavailable(Box<dyn Error + Send + Sync>)

The device lacks resources needed to unlock or keep keys.

§

Keychain(KeychainError)

The OS credential store refused an operation.

§

KeychainTemporarilyUnavailable(KeychainError)

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

Source§

fn bug(&self) -> Option<&Bug>

The bug this error carries, itself or through the failure it keeps.
Source§

impl Debug for KeyError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for KeyError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for KeyError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Bug> for KeyError

Source§

fn from(source: Bug) -> Self

Converts to this type from the input type.
Source§

impl From<CryptoError> for KeyError

Source§

fn from(source: CryptoError) -> Self

Converts to this type from the input type.
Source§

impl From<FileError> for KeyError

Source§

fn from(error: FileError) -> Self

Converts to this type from the input type.
Source§

impl From<KeyError> for IdentityError

Source§

fn from(error: KeyError) -> Self

Converts to this type from the input type.
Source§

impl From<KeychainError> for KeyError

Source§

fn from(error: KeychainError) -> Self

Converts to this type from the input type.
Source§

impl From<MaterialError> for KeyError

Source§

fn from(source: MaterialError) -> Self

Converts to this type from the input type.
Source§

impl From<Shutdown> for KeyError

Source§

fn from(source: Shutdown) -> Self

Converts to this type from the input type.
Source§

impl From<TaskFailed> for KeyError

Source§

fn from(failed: TaskFailed) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,