#[non_exhaustive]pub enum KeyStorageErrorKind {
UnsupportedKeyType,
KeyAlgorithmMismatch,
UnsupportedSignatureAlgorithm,
KeyNotFound,
Unavailable,
Unauthenticated,
RetryableIOFailure,
SerializationError,
Unspecified,
}
Expand description
The cause of the failed key storage operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedKeyType
Indicates that a user tried to generate a key which the key storage implementation does not support.
KeyAlgorithmMismatch
Indicates an attempt to generate or insert a key with a key type that the key storage implementation deems incompatible with the given signature algorithm.
UnsupportedSignatureAlgorithm
Indicates an attempt to parse a signature algorithm that is not recognized by the key storage implementation.
KeyNotFound
Indicates that the key storage implementation is not able to find the requested key.
Indicates that the storage is unavailable for an unpredictable amount of time.
Occurrences of this variant should hopefully be rare, but could occur if hardware fails, or a hosted key store goes offline.
Unauthenticated
Indicates that an attempt was made to authenticate with the key storage, but the operation did not succeed.
RetryableIOFailure
Indicates an unsuccessful I/O operation that may be retried, such as a temporary connection failure or timeouts.
Returning this error signals to the caller that the operation may be retried with a chance of success. It is at the caller’s discretion whether to retry or not, and how often.
SerializationError
Indicates a failure to serialize or deserialize.
Unspecified
Indicates that something went wrong, but it is unclear whether the reason matches any of the other variants.
When using this variant one may want to attach additional context to the corresponding KeyStorageError
. See
KeyStorageError::with_custom_message
and
KeyStorageError::with_source
.
Implementations§
Trait Implementations§
source§impl AsRef<str> for KeyStorageErrorKind
impl AsRef<str> for KeyStorageErrorKind
source§impl Clone for KeyStorageErrorKind
impl Clone for KeyStorageErrorKind
source§fn clone(&self) -> KeyStorageErrorKind
fn clone(&self) -> KeyStorageErrorKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more