checkbox_list/
checkbox_list.rs1fn main() {
2 let result = CheckboxList::<&'static str>::new("Please select an option:")
3 .add_item("Option 1", "version 2.4")
4 .add_item("Option 2", "version 2.5")
5 .add_item("Option 3", "version 2.6")
6 .inquire();
7
8 match result {
9 Ok(..) => {}
10 Err(error) => match error {
11 InquiryMessage::CloseRequested => return,
12 _ => panic!(
13 "There was an other error encoutered that shouldn't \
14 happen."
15 ),
16 },
17 }
18}
19
20use term_inquiry::{CheckboxList, InquiryMessage};