#[non_exhaustive]pub enum ApiKeyError {
Namespace(String),
Scope(String),
UnknownKey(String),
Random(RandomError),
Db(DbError),
}Expand description
Why a key operation failed; in every variant, nothing was written.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Namespace(String)
The namespace failed the [a-z0-9]+ check.
Scope(String)
A scope was empty or contained whitespace, which the space-separated storage could not round-trip.
UnknownKey(String)
The prefix named no active key (unknown, or already revoked).
Random(RandomError)
The entropy source failed.
Db(DbError)
A database statement (or an unformattable clock reading) failed.
Trait Implementations§
Source§impl Clone for ApiKeyError
impl Clone for ApiKeyError
Source§impl Debug for ApiKeyError
impl Debug for ApiKeyError
Source§impl Display for ApiKeyError
impl Display for ApiKeyError
impl Eq for ApiKeyError
Source§impl Error for ApiKeyError
impl Error for ApiKeyError
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<DbError> for ApiKeyError
impl From<DbError> for ApiKeyError
Source§impl From<RandomError> for ApiKeyError
impl From<RandomError> for ApiKeyError
Source§fn from(source: RandomError) -> Self
fn from(source: RandomError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ApiKeyError
impl PartialEq for ApiKeyError
impl StructuralPartialEq for ApiKeyError
Auto Trait Implementations§
impl Freeze for ApiKeyError
impl RefUnwindSafe for ApiKeyError
impl Send for ApiKeyError
impl Sync for ApiKeyError
impl Unpin for ApiKeyError
impl UnsafeUnpin for ApiKeyError
impl UnwindSafe for ApiKeyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.