Struct password_gen::password_options::PasswordOptions
source · [−]Expand description
Describes the options that are passed into the generate_password function.
Fields
min_length: u32How many characters in the password. Or, how many words in the password.
character_set: CharSetThe set of characters or words to randmoly select from.
Implementations
sourceimpl 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 RefUnwindSafe for PasswordOptions
impl Send for PasswordOptions
impl Sync for PasswordOptions
impl Unpin for PasswordOptions
impl UnwindSafe for PasswordOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more