pub struct PasswordInput<'a> { /* private fields */ }
Expand description

Renders a password input prompt.

Example usage

use dialoguer::PasswordInput;

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

Implementations

Creates a new input prompt.

Creates the password input with a specific theme.

Sets the prompt.

Enables confirmation prompting.

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.

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.