[][src]Struct pixel_widgets::widget::menu::Menu

pub struct Menu<'a, T: 'a, S: AsMut<[MenuItem<'a, T>]>> { /* fields omitted */ }

A (context) menu with nestable items

Implementations

impl<'a, T: 'a> Menu<'a, T, Vec<MenuItem<'a, T>>>[src]

pub fn new(state: &'a mut State) -> Self[src]

Construct a new Menu

pub fn push(self, item: MenuItem<'a, T>) -> Self[src]

Adds an item to the menu

pub fn extend<I: IntoIterator<Item = MenuItem<'a, T>>>(self, iter: I) -> Self[src]

Adds items using an iterator

Trait Implementations

impl<'a, T: 'a + Send, S: 'a + Send + AsRef<[MenuItem<'a, T>]> + AsMut<[MenuItem<'a, T>]>> IntoNode<'a, T> for Menu<'a, T, S>[src]

impl<'a, T: 'a + Send, S: Send + AsRef<[MenuItem<'a, T>]> + AsMut<[MenuItem<'a, T>]>> Widget<'a, T> for Menu<'a, T, S>[src]

Auto Trait Implementations

impl<'a, T, S> RefUnwindSafe for Menu<'a, T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<'a, T, S> Send for Menu<'a, T, S> where
    S: Send,
    T: Send
[src]

impl<'a, T, S> Sync for Menu<'a, T, S> where
    S: Sync,
    T: Sync
[src]

impl<'a, T, S> Unpin for Menu<'a, T, S> where
    S: Unpin,
    T: Unpin
[src]

impl<'a, T, S> !UnwindSafe for Menu<'a, T, S>[src]

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

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

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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> 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.