Function read_custom_nonempty

Source
pub fn read_custom_nonempty<T: FromStr>(question: &str) -> Result<T>
Expand description

Read in any type that implementd FromStr from stdio.

If the text was empty, or couldn’t be converted, then the user will be asked for more input.

§Examples

let number: u32 = read_human::read_custom_nonempty("How old are you")?;