pub enum PasswordError {
TooShort,
TooCommon,
TooSimple,
NonAsciiPassword,
InternalError,
}
Expand description
The suite of possible errors returned from passablewords. These represent the three checks made
for length, uniqueness, and entropy. If something goes wrong during the request, an
InternalError
error is returned.
Variants§
TooShort
The password is less than 8 characters and is therefore too short.
TooCommon
The password is within the list of 1,000,000 most common passwords and should not be used.
TooSimple
The entropy of the password is too low, which means it could be easily guessable/crackable. A more random password should be used instead.
NonAsciiPassword
The password isn’t using ascii characters, a requirement that zxcvbn has
InternalError
Something went wrong during the password checks and a normal error couldn’t be returned.
Trait Implementations§
Source§impl Debug for PasswordError
impl Debug for PasswordError
Source§impl PartialEq for PasswordError
impl PartialEq for PasswordError
impl StructuralPartialEq for PasswordError
Auto Trait Implementations§
impl Freeze for PasswordError
impl RefUnwindSafe for PasswordError
impl Send for PasswordError
impl Sync for PasswordError
impl Unpin for PasswordError
impl UnwindSafe for PasswordError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more