Skip to main content

KeyError

Enum KeyError 

Source
pub enum KeyError {
Show 40 variants File(FileError), Keyring(Error), KeyringWorkerStart(Error), KeyringWorkerStopped { operation: &'static str, }, Custody { operation: &'static str, source: Box<dyn Error + Send + Sync + 'static>, }, Json { operation: &'static str, source: Error, }, Hex { subject: &'static str, source: FromHexError, }, InvalidLength { subject: &'static str, expected: usize, actual: usize, }, SigningKey(SignatureError), Encryption(EncryptionError), Utf8(FromUtf8Error), Base64(DecodeError), PassphraseKdf { operation: &'static str, source: Box<dyn Error + Send + Sync + 'static>, }, UnsupportedPassphraseEnvelopeVersion { actual: u32, expected: u32, }, UnsupportedPassphraseKdf { actual: String, expected: &'static str, }, WeakArgon2Parameter { parameter: &'static str, actual: u32, minimum: u32, }, PassphraseEnvelopeDecryption, SealedBoxDecryption, InvalidEd25519PublicKey, WeakEd25519PublicKey, AllZeroX25519PublicKey, AllZeroX25519SharedSecret, PlaintextCloudKeyRotation, UnretainedKeyRotation, ServiceAlreadyRegistered { registered: String, requested: String, }, EmptyKeyringEntry { account: String, }, CloudCredentialsRolledBack { operation: &'static str, }, CloudCredentialsSuperseded, MasterKeySetupRolledBack { operation: &'static str, }, UnexpectedAppleKeyringEntry, UnexpectedTestKeyringEntry, StoreNotInstalled, UnsupportedKeyringPlatform, ServiceNotRegistered, NoDeviceIdentity, IdentityMismatch { existing_pubkey_hex: String, imported_pubkey_hex: String, }, NoPendingIdentity { pending_public_key_hex: String, }, InvalidSecretName { name: String, reason: String, }, MissingKeychainEntitlement, KeychainTemporarilyUnavailable,
}

Variants§

§

File(FileError)

§

Keyring(Error)

§

KeyringWorkerStart(Error)

§

KeyringWorkerStopped

Fields

§operation: &'static str
§

Custody

Fields

§operation: &'static str
§source: Box<dyn Error + Send + Sync + 'static>
§

Json

Fields

§operation: &'static str
§source: Error
§

Hex

Fields

§subject: &'static str
§

InvalidLength

Fields

§subject: &'static str
§expected: usize
§actual: usize
§

SigningKey(SignatureError)

§

Encryption(EncryptionError)

§

Utf8(FromUtf8Error)

§

Base64(DecodeError)

§

PassphraseKdf

Fields

§operation: &'static str
§source: Box<dyn Error + Send + Sync + 'static>
§

UnsupportedPassphraseEnvelopeVersion

Fields

§actual: u32
§expected: u32
§

UnsupportedPassphraseKdf

Fields

§actual: String
§expected: &'static str
§

WeakArgon2Parameter

Fields

§parameter: &'static str
§actual: u32
§minimum: u32
§

PassphraseEnvelopeDecryption

§

SealedBoxDecryption

§

InvalidEd25519PublicKey

§

WeakEd25519PublicKey

§

AllZeroX25519PublicKey

§

AllZeroX25519SharedSecret

§

PlaintextCloudKeyRotation

§

UnretainedKeyRotation

§

ServiceAlreadyRegistered

Fields

§registered: String
§requested: String
§

EmptyKeyringEntry

Fields

§account: String
§

CloudCredentialsRolledBack

Fields

§operation: &'static str
§

CloudCredentialsSuperseded

§

MasterKeySetupRolledBack

Fields

§operation: &'static str
§

UnexpectedAppleKeyringEntry

§

UnexpectedTestKeyringEntry

§

StoreNotInstalled

§

UnsupportedKeyringPlatform

§

ServiceNotRegistered

§

NoDeviceIdentity

§

IdentityMismatch

Fields

§existing_pubkey_hex: String
§imported_pubkey_hex: String
§

NoPendingIdentity

Fields

§pending_public_key_hex: String
§

InvalidSecretName

Fields

§name: String
§reason: String
§

MissingKeychainEntitlement

The OS refused a Keychain data-protection-store operation with errSecMissingEntitlement (OSStatus -34018). This is not “the binary isn’t signed” — an ad-hoc or Development-signed binary with no keychain-access-groups entitlement at all also gets -34018, and a signed binary that does carry that entitlement with no provisioning profile behind it is killed by the kernel at launch instead. The fix is a team-prefixed keychain-access-groups entitlement backed by an embedded provisioning profile — in Xcode, set DEVELOPMENT_TEAM so automatic signing fetches and embeds one. A build with no team must omit the entitlement entirely, which means it also has no access to the data-protection keychain and will hit this error on first use.

§

KeychainTemporarilyUnavailable

The OS refused this keychain operation with errSecInteractionNotAllowed (OSStatus -25308): the keychain is locked, the display is asleep, or the login session cannot show UI. Nothing is wrong with the entry or with this process’s entitlements — the same operation succeeds once the session unlocks, so a caller that needs the key should say so and try again rather than treat the store as broken or the key as absent.

Trait Implementations§

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<DecodeError> for KeyError

Source§

fn from(source: DecodeError) -> Self

Converts to this type from the input type.
Source§

impl From<EncryptionError> for KeyError

Source§

fn from(source: EncryptionError) -> Self

Converts to this type from the input type.
Source§

impl From<FileError> for KeyError

Source§

fn from(source: FileError) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for KeyError

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<KeyError> for IdentityError

Source§

fn from(source: KeyError) -> Self

Converts to this type from the input type.
Source§

impl From<KeyError> for MasterKeyError

Source§

fn from(source: KeyError) -> Self

Converts to this type from the input type.
Source§

impl From<KeyError> for RoutingEncryptionError

Source§

fn from(source: KeyError) -> Self

Converts to this type from the input type.
Source§

impl From<KeyError> for SealError

Source§

fn from(source: KeyError) -> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,