#[non_exhaustive]pub struct PasswordValidationPolicy {
pub min_length: Option<Int32Value>,
pub complexity: Complexity,
pub reuse_interval: Option<Int32Value>,
pub disallow_username_substring: Option<BoolValue>,
pub password_change_interval: Option<Duration>,
pub enable_password_policy: Option<BoolValue>,
pub disallow_compromised_credentials: Option<BoolValue>,
/* private fields */
}Expand description
Database instance local user 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.min_length: Option<Int32Value>Minimum number of characters allowed.
complexity: ComplexityThe complexity of the password.
reuse_interval: Option<Int32Value>Number of previous passwords that cannot be reused.
disallow_username_substring: Option<BoolValue>Disallow username as a part of the password.
password_change_interval: Option<Duration>Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.
enable_password_policy: Option<BoolValue>Whether the password policy is enabled or not.
disallow_compromised_credentials: Option<BoolValue>👎Deprecated
This field is deprecated and will be removed in a future version of the API.
Implementations§
Source§impl PasswordValidationPolicy
impl PasswordValidationPolicy
pub fn new() -> Self
Sourcepub fn set_min_length<T: Into<Option<Int32Value>>>(self, v: T) -> Self
pub fn set_min_length<T: Into<Option<Int32Value>>>(self, v: T) -> Self
Sets the value of min_length.
Sourcepub fn set_complexity<T: Into<Complexity>>(self, v: T) -> Self
pub fn set_complexity<T: Into<Complexity>>(self, v: T) -> Self
Sets the value of complexity.
Sourcepub fn set_reuse_interval<T: Into<Option<Int32Value>>>(self, v: T) -> Self
pub fn set_reuse_interval<T: Into<Option<Int32Value>>>(self, v: T) -> Self
Sets the value of reuse_interval.
Sourcepub fn set_disallow_username_substring<T: Into<Option<BoolValue>>>(
self,
v: T,
) -> Self
pub fn set_disallow_username_substring<T: Into<Option<BoolValue>>>( self, v: T, ) -> Self
Sets the value of disallow_username_substring.
Sourcepub fn set_password_change_interval<T: Into<Option<Duration>>>(
self,
v: T,
) -> Self
pub fn set_password_change_interval<T: Into<Option<Duration>>>( self, v: T, ) -> Self
Sets the value of password_change_interval.
Sourcepub fn set_enable_password_policy<T: Into<Option<BoolValue>>>(
self,
v: T,
) -> Self
pub fn set_enable_password_policy<T: Into<Option<BoolValue>>>( self, v: T, ) -> Self
Sets the value of enable_password_policy.
Sourcepub fn set_disallow_compromised_credentials<T: Into<Option<BoolValue>>>(
self,
v: T,
) -> Self
👎Deprecated
pub fn set_disallow_compromised_credentials<T: Into<Option<BoolValue>>>( self, v: T, ) -> Self
Sets the value of disallow_compromised_credentials.
Trait Implementations§
Source§impl Clone for PasswordValidationPolicy
impl Clone for PasswordValidationPolicy
Source§fn clone(&self) -> PasswordValidationPolicy
fn clone(&self) -> PasswordValidationPolicy
Returns a copy 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 PasswordValidationPolicy
impl Debug for PasswordValidationPolicy
Source§impl Default for PasswordValidationPolicy
impl Default for PasswordValidationPolicy
Source§fn default() -> PasswordValidationPolicy
fn default() -> PasswordValidationPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PasswordValidationPolicywhere
PasswordValidationPolicy: Default,
impl<'de> Deserialize<'de> for PasswordValidationPolicywhere
PasswordValidationPolicy: Default,
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 Message for PasswordValidationPolicy
impl Message for PasswordValidationPolicy
Source§impl PartialEq for PasswordValidationPolicy
impl PartialEq for PasswordValidationPolicy
Source§impl Serialize for PasswordValidationPolicy
impl Serialize for PasswordValidationPolicy
impl StructuralPartialEq for PasswordValidationPolicy
Auto Trait Implementations§
impl Freeze for PasswordValidationPolicy
impl RefUnwindSafe for PasswordValidationPolicy
impl Send for PasswordValidationPolicy
impl Sync for PasswordValidationPolicy
impl Unpin for PasswordValidationPolicy
impl UnwindSafe for PasswordValidationPolicy
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