[][src]Function read_human::read_custom

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

Read in any type that implementd FromStr from stdio.

If the text couldn't be converted, then the user will be asked for more input.

Examples

let number: Option<u32> = read_human::read_custom(
    "Let us know how many times you've visited, if applicable")?;