pub enum KeyringError {
UserNotFound,
InvalidUser(InvalidFilenameComponent),
LockPoisoned,
CorruptSecret {
length: usize,
},
IoError(Error),
RekeyRollbackFailed {
cache_error: Error,
rollback_error: Error,
},
KeyringError(Error),
KeyError(KeyError),
}Expand description
An error locating a user, accessing key storage, or decoding a key.
I/O, keyring-backend, and key-decoding errors retain their underlying error
as a source and can be converted into this type with From.
Variants§
UserNotFound
The requested user could not be found.
InvalidUser(InvalidFilenameComponent)
A user name is not a portable, single filename component.
LockPoisoned
std only.A panic poisoned an in-process keyring coordination lock.
CorruptSecret
A stored secret has an invalid length; its contents are never included.
IoError(Error)
std only.A filesystem or other I/O operation failed.
Available with the std feature.
RekeyRollbackFailed
std only.Publishing a rekeyed public key and restoring the previous secret failed.
The backend may retain the new secret. After resolving the storage
failures, Keyring::ensure_secret_key repairs the cache from the stored
secret without rotating it again.
Fields
KeyringError(Error)
The keyring backend failed to initialize or access a secret-key entry.
KeyError(KeyError)
A key could not be decoded, for example from a stored public-key file.
Trait Implementations§
Source§impl Debug for KeyringError
impl Debug for KeyringError
Source§impl Display for KeyringError
impl Display for KeyringError
Source§impl Error for KeyringError
impl Error for KeyringError
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()
Source§impl From<Error> for KeyringError
impl From<Error> for KeyringError
Source§impl From<Error> for KeyringError
impl From<Error> for KeyringError
Source§impl From<InvalidFilenameComponent> for KeyringError
impl From<InvalidFilenameComponent> for KeyringError
Source§fn from(source: InvalidFilenameComponent) -> Self
fn from(source: InvalidFilenameComponent) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for KeyringError
impl !UnwindSafe for KeyringError
impl Freeze for KeyringError
impl Send for KeyringError
impl Sync for KeyringError
impl Unpin for KeyringError
impl UnsafeUnpin for KeyringError
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.