pub struct Menu<'a, I, T>where
T: 'a,{
pub label: &'a str,
pub items: &'a [&'a Item<'a, I, T>],
pub entry: Option<MenuCallbackFn<I, T>>,
pub exit: Option<MenuCallbackFn<I, T>>,
}
Expand description
A Menu
is made of one or more Item
s.
Fields§
§label: &'a str
Each menu has a label which is visible in the prompt, unless you are the root menu.
items: &'a [&'a Item<'a, I, T>]
A slice of menu items in this menu.
entry: Option<MenuCallbackFn<I, T>>
A function to call when this menu is entered. If this is the root menu, this is called when the runner is created.
exit: Option<MenuCallbackFn<I, T>>
A function to call when this menu is exited. Never called for the root menu.
Trait Implementations§
Auto Trait Implementations§
impl<'a, I, T> Freeze for Menu<'a, I, T>
impl<'a, I, T> RefUnwindSafe for Menu<'a, I, T>
impl<'a, I, T> Send for Menu<'a, I, T>
impl<'a, I, T> Sync for Menu<'a, I, T>
impl<'a, I, T> Unpin for Menu<'a, I, T>
impl<'a, I, T> UnwindSafe for Menu<'a, I, T>
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