Function scanpw::try_scanpw
source · pub fn try_scanpw(echo: Option<char>) -> Result<String, Error>
Expand description
Attempts to read a password from standard input
echo
controls whether a replacement character should be printed each time
the user enters a character, and if so, which character. The result is
either a String
or a crossterm::ErrorKind
. Input begins wherever the
cursor was before calling this function, which is likely to be on its own
empty line.
Errors
This function can fail if the password cannot be read from standard input.