Function catch_input::get_input_with
source · [−]Expand description
Returns a trimmed String containing the user input from standard input.
You may pass a function that is meant to work as the input prompt.
Example
let inp = get_input_with(|| { print!("Input => "); });
assert!(inp, String::from("Hello, World!"));The application input would like this…
Input => Hello, World!