Function read_stdin::read_stdin
source · Expand description
Read user input from stdin
and try to parse it into a generic type.
Example
use read_stdin::read_stdin;
let Ok(n) = read_stdin::<i32>() else {
println!("You entered an incorrect data type!");
return;
};
println!("You entered: {}", n)