pub struct Menu { /* private fields */ }
Expand description
Interactive console menu.
Create a menu by passing it a list of MenuOption
and a MenuProps
. Display using.show()
.
let menu_options = vec![
MenuOption::new("option 1", || println!("option one!")),
MenuOption::new("option 2", || println!("option two!")),
MenuOption::new("option 3", || println!("option three!")),
];
let mut menu = Menu::new(menu_options, MenuProps::default());
menu.show();
Implementations§
Auto Trait Implementations§
impl Freeze for Menu
impl !RefUnwindSafe for Menu
impl !Send for Menu
impl !Sync for Menu
impl Unpin for Menu
impl !UnwindSafe for Menu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more