pub fn prompt_until_ok<T>(prompt: &(impl ToString + Display + ?Sized)) -> Twhere
T: FromStr + 'static,Expand description
Creates a CLI prompt and repeatetly asks the user for input until their input is of valid type.
ยงExample
use read_stdin;
let n: i32 = read_stdin::prompt_until_ok("Enter a number: ");
println!("You entered: {}", n);