pub struct PasswordOptions {
pub min_password_length: usize,
pub max_password_length: usize,
pub on_password_reset: Option<Arc<dyn OnPasswordReset>>,
pub revoke_sessions_on_password_reset: bool,
}Expand description
Password policy configuration.
Fields§
§min_password_length: usize§max_password_length: usize§on_password_reset: Option<Arc<dyn OnPasswordReset>>§revoke_sessions_on_password_reset: boolImplementations§
Source§impl PasswordOptions
impl PasswordOptions
pub fn new() -> Self
pub fn builder() -> Self
pub fn min_password_length(self, length: usize) -> Self
pub fn max_password_length(self, length: usize) -> Self
pub fn on_password_reset<P>(self, handler: P) -> Selfwhere
P: OnPasswordReset,
pub fn revoke_sessions_on_password_reset(self, enabled: bool) -> Self
Trait Implementations§
Source§impl Clone for PasswordOptions
impl Clone for PasswordOptions
Source§fn clone(&self) -> PasswordOptions
fn clone(&self) -> PasswordOptions
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 moreSource§impl Debug for PasswordOptions
impl Debug for PasswordOptions
Auto Trait Implementations§
impl Freeze for PasswordOptions
impl !RefUnwindSafe for PasswordOptions
impl Send for PasswordOptions
impl Sync for PasswordOptions
impl Unpin for PasswordOptions
impl UnsafeUnpin for PasswordOptions
impl !UnwindSafe for PasswordOptions
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