Struct dialoguer::PasswordInput
[−]
[src]
pub struct PasswordInput { /* fields omitted */ }
Renders a password input prompt.
Example usage
use dialoguer::PasswordInput; let password = PasswordInput::new("New Password") .confirm("Confirm password", "Passwords mismatching") .interact()?; println!("Length of the password is: {}", password.len());
Methods
impl PasswordInput
[src]
fn new(text: &str) -> PasswordInput
Creates a new input prompt.
fn confirm(&mut self, prompt: &str, mismatch_err: &str) -> &mut PasswordInput
Enables confirmation prompting.
fn interact(&self) -> Result<String>
Enables user interaction and returns the result.
If the user confirms the result is true
, false
otherwise.
The dialog is rendered on stderr.
fn interact_on(&self, term: &Term) -> Result<String>
Like interact
but allows a specific terminal to be set.