#[non_exhaustive]pub enum CredentialError {
PasswordLength(usize),
Character(char),
NotHex,
KeyLength(usize),
Entropy,
}Expand description
Why a credential was rejected.
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.
PasswordLength(usize)
The password is shorter than BASIC_AUTH_MIN_LEN or longer than the maximum in force
(A00.FR.205).
Character(char)
The password contains a character outside PASSWORD_STRING_CHARSET — the first one.
NotHex
The 1.6 AuthorizationKey is not a hexadecimal string.
KeyLength(usize)
The 1.6 AuthorizationKey decodes to fewer than AUTHORIZATION_KEY_MIN_BYTES or
more than AUTHORIZATION_KEY_MAX_BYTES octets (1.6 Security Whitepaper A00.FR.205).
Entropy
The operating system’s entropy source failed, so no password was generated.
Trait Implementations§
Source§impl Clone for CredentialError
impl Clone for CredentialError
impl Copy for CredentialError
Source§impl Debug for CredentialError
impl Debug for CredentialError
Source§impl Display for CredentialError
impl Display for CredentialError
impl Eq for CredentialError
Source§impl Error for CredentialError
impl Error for CredentialError
1.30.0 · 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 PartialEq for CredentialError
impl PartialEq for CredentialError
impl StructuralPartialEq for CredentialError
Auto Trait Implementations§
impl Forget for CredentialError
impl Freeze for CredentialError
impl Move for CredentialError
impl RefUnwindSafe for CredentialError
impl Send for CredentialError
impl Sync for CredentialError
impl Unpin for CredentialError
impl UnsafeUnpin for CredentialError
impl UnwindSafe for CredentialError
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