interviewer
A simple CLI prompting crate for Rust.
Features include:
- Consecutive prompts
- Prompts for several types, and extensible
- Custom delimiters
Usage
No need to chit-chat. Examples are much better:
use ;
// Ask once
let num: i32 = ask.unwrap_or;
// Ask until valid input
let num: f32 = ask_until;
// Optionally ask for a value. Empty input returns None.
let s: = ask_opt;
// Ask for multiple bools separated by a ","
let bools: = ask_many.unwrap;