Trait PasswordReader

Source
pub trait PasswordReader {
    // Required methods
    fn read_password(&mut self) -> Result<String>;
    fn read_password_with_prompt(&mut self, prompt: &str) -> Result<String>;
}
Expand description

A trait for reading passwords from the user.

Required Methods§

Source

fn read_password(&mut self) -> Result<String>

Reads a password from the user.

Source

fn read_password_with_prompt(&mut self, prompt: &str) -> Result<String>

Reads a password from the user with a prompt.

Implementors§