pub enum PolicyViolation {
TooShort {
min: usize,
actual: usize,
},
TooLong {
max: usize,
actual: usize,
},
MissingUppercase,
MissingLowercase,
MissingDigit,
MissingSpecial,
InsufficientCharacterClasses {
required: usize,
actual: usize,
},
CommonPassword,
ContainsUsername,
TooWeak {
required: PasswordStrength,
actual: PasswordStrength,
},
}Expand description
Password policy violation types
Variants§
TooShort
Password is too short
TooLong
Password is too long
MissingUppercase
Missing uppercase letter
MissingLowercase
Missing lowercase letter
MissingDigit
Missing digit
MissingSpecial
Missing special character
InsufficientCharacterClasses
Not enough character classes
CommonPassword
Password is too common
ContainsUsername
Password contains username
TooWeak
Password is too weak
Trait Implementations§
Source§impl Clone for PolicyViolation
impl Clone for PolicyViolation
Source§fn clone(&self) -> PolicyViolation
fn clone(&self) -> PolicyViolation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolicyViolation
impl Debug for PolicyViolation
Source§impl<'de> Deserialize<'de> for PolicyViolation
impl<'de> Deserialize<'de> for PolicyViolation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PolicyViolation
impl PartialEq for PolicyViolation
Source§impl Serialize for PolicyViolation
impl Serialize for PolicyViolation
impl Eq for PolicyViolation
impl StructuralPartialEq for PolicyViolation
Auto Trait Implementations§
impl Freeze for PolicyViolation
impl RefUnwindSafe for PolicyViolation
impl Send for PolicyViolation
impl Sync for PolicyViolation
impl Unpin for PolicyViolation
impl UnwindSafe for PolicyViolation
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.