Skip to main content

read_prompt_result

Function read_prompt_result 

Source
pub fn read_prompt_result(prompt: &str) -> Result<String>
Expand description

Read input from stdin with a prompt, returning a Result

§Arguments

  • prompt - The prompt to display to the user

§Returns

  • Ok(String) - The user’s input (trimmed)
  • Err - If reading from stdin fails