Function eprompt::input

source ·
pub fn input<T: FromStr>(prompt: &str) -> Result<T>
Expand description

Prompts the user for input and parses it to the specified type.

use eprompt::*;
let x: i32 = input("How old are you? ").unwrap();