pub struct PasswordOptions {
pub min_length: u32,
pub character_set: CharSet,
}
Expand description
Describes the options that are passed into the generate_password function.
Fields§
§min_length: u32
How many characters in the password. Or, how many words in the password.
character_set: CharSet
The set of characters or words to randmoly select from.
Implementations§
Source§impl PasswordOptions
impl PasswordOptions
Sourcepub fn new(min_length: u32, character_set: CharSet) -> PasswordOptions
pub fn new(min_length: u32, character_set: CharSet) -> PasswordOptions
Create a set of options for generating a password.
§Example
use password_gen::{PasswordOptions, PasswordGenerator};
use password_gen::password_options::CharSet;
let mut generator = PasswordGenerator::new();
let options = PasswordOptions::new(15, CharSet::Ascii);
let password = generator.generate_password(&options);
Auto Trait Implementations§
impl Freeze for PasswordOptions
impl RefUnwindSafe for PasswordOptions
impl Send for PasswordOptions
impl Sync for PasswordOptions
impl Unpin 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