promptis
A Rust crate to simplify getting user input in the CLI.
Examples
cargo run --example hello: A basic Hello World program that reads the user's name
cargo run --example data: A program that asks for a message and a number and repeats the message that many times
cargo run --example closing: A program that demonstrates the user ending the program early with an input
Example Usage
// Prompt for the user's name and wait for them to respond with input
let name: String = new.prompt.wait;
// Prompt the user for a number and wait for them to respond,
// displaying the error if they input something else
let id: u32 = new
.prompt
.err_msg
.wait;