[−][src]Function casual::prompt
pub fn prompt<S, T>(text: S) -> Input<T> where
S: Into<String>,
Returns an Input
that prompts the user for input.
Examples
Read in a simple string:
ⓘThis example is not tested
let username: String = prompt("Please enter your name: ").get();
Types that implement FromStr
will be automatically parsed.
ⓘThis example is not tested
let years = prompt("How many years have you been coding Rust: ").default(0).get();