cloud_terrastodon_user_input 0.35.0

Helper functions for interacting with users in the terminal
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use cloud_terrastodon_user_input::Choice;
use cloud_terrastodon_user_input::PickerTui;

#[test]
#[ignore = "interactive test"]
pub fn it_works() -> eyre::Result<()> {
    let choices = [1, 2, 3];
    let _chosen = PickerTui::new().pick_one(choices.into_iter().map(|x| Choice {
        key: x.to_string(),
        value: x,
    }))?;
    Ok(())
}