[][src]Struct menu::Menu

pub struct Menu<'a, T> where
    T: 'a, 
{ pub label: &'a str, pub items: &'a [&'a Item<'a, T>], pub entry: Option<MenuCallbackFn<T>>, pub exit: Option<MenuCallbackFn<T>>, }

A Menu is made of one or more Items.

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, T>]

A slice of menu items in this menu.

entry: Option<MenuCallbackFn<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<T>>

A function to call when this menu is exited. Never called for the root menu.

Auto Trait Implementations

impl<'a, T> Unpin for Menu<'a, T>

impl<'a, T> Sync for Menu<'a, T>

impl<'a, T> Send for Menu<'a, T>

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]