easy_input_tools 0.1.0

A library for easy input tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

fn main() {
    println!("What colors do you like?");
    let options = vec!["red", "blue", "green"];
    if let Ok(colors_indecies) = easy_input_tools::ascii::checkbox(&options) {
        println!(
            "You like: {:?}",
            options
                .iter()
                .enumerate()
                .filter(|(i, _)| colors_indecies.contains(i))
                .map(|(_, option)| option)
                .collect::<Vec<_>>()
        );
    } else {
        println!("Some io issue");
    }
}