Struct dialoguer::Password[][src]

pub struct Password<'a> { /* fields omitted */ }
Expand description

Renders a password input prompt.

Example usage

use dialoguer::Password;

let password = Password::new().with_prompt("New Password")
    .with_confirmation("Confirm password", "Passwords mismatching")
    .interact()?;
println!("Length of the password is: {}", password.len());

Implementations

Creates a password input prompt.

Creates a password input prompt with a specific theme.

Sets the password input prompt.

Enables confirmation prompting.

Allows/Disables empty password.

By default this setting is set to false (i.e. password is not empty).

Enables user interaction and returns the result.

If the user confirms the result is true, false otherwise. The dialog is rendered on stderr.

Like interact but allows a specific terminal to be set.

Trait Implementations

Returns the “default value” for a type. Read more

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

Performs the conversion.

Performs the conversion.

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.