pub enum WeakApiKey {
TooShort,
TooFewDistinctSymbols,
TooPredictable,
}Expand description
Why an API key was refused as too weak to be safe.
See validate_api_key_strength for what is and is not being claimed here.
Variants§
TooShort
Shorter than MIN_API_KEY_BYTES.
TooFewDistinctSymbols
Built from too small an alphabet to carry meaningful entropy.
TooPredictable
Symbol distribution is too skewed, as in a long run of one character.
Trait Implementations§
Source§impl Clone for WeakApiKey
impl Clone for WeakApiKey
Source§fn clone(&self) -> WeakApiKey
fn clone(&self) -> WeakApiKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WeakApiKey
Source§impl Debug for WeakApiKey
impl Debug for WeakApiKey
Source§impl Display for WeakApiKey
impl Display for WeakApiKey
impl Eq for WeakApiKey
Source§impl Error for WeakApiKey
impl Error for WeakApiKey
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 WeakApiKey
impl PartialEq for WeakApiKey
impl StructuralPartialEq for WeakApiKey
Auto Trait Implementations§
impl Freeze for WeakApiKey
impl RefUnwindSafe for WeakApiKey
impl Send for WeakApiKey
impl Sync for WeakApiKey
impl Unpin for WeakApiKey
impl UnsafeUnpin for WeakApiKey
impl UnwindSafe for WeakApiKey
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