pub struct Menu<'a> {
pub name: &'a str,
pub exp: Option<&'a str>,
pub items: Vec<Item<'a>>,
pub esc: bool,
}
Expand description
Starting point for creating a menu instance.
Fields
name: &'a str
Menu
name is displayed at the top.
exp: Option<&'a str>
Optional explanation in gray color next to the menu name.
items: Vec<Item<'a>>
Menu
items should be vector of Item
s.
esc: bool
Enable exiting menu by Esc
hotkey. Usually set it to true
. But it may be useful to set to false
when you want to restrict the user from escaping without any selection.