pub enum KeyError {
InvalidId,
MissingKey {
id: KeyId,
epoch: u32,
},
MissingCurrentEpoch(KeyId),
InvalidWrappedKey,
UnsupportedScheme(KeyId),
Unreadable {
id: KeyId,
reason: String,
},
InvalidMaterial(KeyId),
WrappedEpochMismatch {
expected: u32,
actual: u32,
},
Crypt(CryptError),
}Expand description
Failures while resolving or wrapping keys.
Variants§
InvalidId
A key identity was empty.
MissingKey
No material exists for this identity and epoch.
MissingCurrentEpoch(KeyId)
No current write epoch is configured for this identity.
InvalidWrappedKey
Wrapped key material decrypted to an invalid length.
UnsupportedScheme(KeyId)
The identity names a scheme this build cannot resolve.
Unreadable
The identity’s source could not be read.
The reason never quotes the material, only where it was looked for.
InvalidMaterial(KeyId)
The source resolved but did not hold a 256-bit key.
WrappedEpochMismatch
Wrapped key metadata named a different key epoch.
Crypt(CryptError)
A cryptographic operation failed.
Trait Implementations§
Source§impl Error for KeyError
impl Error for KeyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CryptError> for KeyError
impl From<CryptError> for KeyError
Source§fn from(source: CryptError) -> Self
fn from(source: CryptError) -> Self
Converts to this type from the input type.
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
Mutably borrows from an owned value. Read more