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

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.