#[non_exhaustive]pub struct UserPasswordValidationPolicy {
pub allowed_failed_attempts: i32,
pub password_expiration_duration: Option<Duration>,
pub enable_failed_attempts_check: bool,
pub status: Option<PasswordStatus>,
pub enable_password_verification: bool,
/* private fields */
}
Expand description
User level password validation policy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.allowed_failed_attempts: i32
Number of failed login attempts allowed before user get locked.
password_expiration_duration: Option<Duration>
Expiration duration after password is updated.
enable_failed_attempts_check: bool
If true, failed login attempts check will be enabled.
status: Option<PasswordStatus>
Output only. Read-only password status.
enable_password_verification: bool
If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.
Implementations§
Source§impl UserPasswordValidationPolicy
impl UserPasswordValidationPolicy
pub fn new() -> Self
Sourcepub fn set_allowed_failed_attempts<T: Into<i32>>(self, v: T) -> Self
pub fn set_allowed_failed_attempts<T: Into<i32>>(self, v: T) -> Self
Sets the value of allowed_failed_attempts.
Sourcepub fn set_password_expiration_duration<T>(self, v: T) -> Self
pub fn set_password_expiration_duration<T>(self, v: T) -> Self
Sets the value of password_expiration_duration.
Sourcepub fn set_or_clear_password_expiration_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_password_expiration_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of password_expiration_duration.
Sourcepub fn set_enable_failed_attempts_check<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_failed_attempts_check<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_failed_attempts_check.
Sourcepub fn set_status<T>(self, v: T) -> Selfwhere
T: Into<PasswordStatus>,
pub fn set_status<T>(self, v: T) -> Selfwhere
T: Into<PasswordStatus>,
Sets the value of status.
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<PasswordStatus>,
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<PasswordStatus>,
Sets or clears the value of status.
Sourcepub fn set_enable_password_verification<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_password_verification<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_password_verification.
Trait Implementations§
Source§impl Clone for UserPasswordValidationPolicy
impl Clone for UserPasswordValidationPolicy
Source§fn clone(&self) -> UserPasswordValidationPolicy
fn clone(&self) -> UserPasswordValidationPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UserPasswordValidationPolicy
impl Debug for UserPasswordValidationPolicy
Source§impl Default for UserPasswordValidationPolicy
impl Default for UserPasswordValidationPolicy
Source§fn default() -> UserPasswordValidationPolicy
fn default() -> UserPasswordValidationPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for UserPasswordValidationPolicy
impl PartialEq for UserPasswordValidationPolicy
Source§fn eq(&self, other: &UserPasswordValidationPolicy) -> bool
fn eq(&self, other: &UserPasswordValidationPolicy) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for UserPasswordValidationPolicy
Auto Trait Implementations§
impl Freeze for UserPasswordValidationPolicy
impl RefUnwindSafe for UserPasswordValidationPolicy
impl Send for UserPasswordValidationPolicy
impl Sync for UserPasswordValidationPolicy
impl Unpin for UserPasswordValidationPolicy
impl UnwindSafe for UserPasswordValidationPolicy
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