clytia 0.2.1

A crate to make writing CLIs a bit nicer, a set of functions for common components
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use clytia::{Clytia, Result};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut clytia = Clytia::default();

    println!("What animal do you like?");
    let choices = clytia.multichoice(["cats", "dogs", "birds"])?;
    if choices.len() < 3 {
        println!("What, You don't like all of them?");
    } else {
        println!("Correct choice!");
    }

    Ok(())
}