[−][src]Function cli_helper::get_line_as
pub fn get_line_as<T: FromStr>() -> Option<T>
Get line of any type that can be [std::str::parse
]d
Example - Echo signed 32bit integer
use cli_helper::get_line_as; fn echo_integer() { println!("Echo: {}", get_line_as::<i32>().expect("Your input was likely not an integer or was larger than {2^31-1}")) }