[][src]Module secret_keeper_prompt::term

functions for prompting user to enter text (hidden & non-hidden)

Functions

get_password

Prompt the user to enter a password. Characters are masked (not echoed to terminal). If password is non-empty, returns Some(p)``, otherwise, prints an error message to the console and returns None`.

get_password_with_confirm

Prompt the user to enter a password, and prompt again for confirmation. If the passwords match and are non-empty, returns Some(p), otherwise, prints an error to the console and returns None. Characters typed are masked (not echoed to terminal).

prompt_string

Prompts the user to enter a string. On a normal tty, the characters typed are echoed. If password entry is desired, use get_password or get_password_with_confirm.