[][src]Function read_human::read_custom_nonempty

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

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")?;