[][src]Function bdrck::cli::prompt_for_string

pub fn prompt_for_string(
    output_stream: Stream,
    prompt: &str,
    is_sensitive: bool
) -> Result<String>

Prompt the user for a string (read from Stdin) using the given output stream (Stdout or Stderr) to display the given prompt message.

If is_sensitive is true, then the users characters will not be echoed back (e.g. this will behave like a password prompt).

Note that it is an error for output_stream to be Stdin, or for this function to be called when the given output stream or Stdin are not TTYs.