entrust-dialog 0.6.0

Interactive terminal dialogs for entrust
Documentation
1
2
3
4
5
6
7
8
9
use entrust_dialog::dialog::Dialog;
use entrust_dialog::yes_no::YesNoDialog;

fn main() -> anyhow::Result<()> {
    let result = YesNoDialog::default().with_message("Yes or no?").run()?;
    let display = if result { "yes" } else { "no" };
    println!("You chose: {display}");
    Ok(())
}