[][src]Struct pixel_widgets::widget::button::Button

pub struct Button<'a, T> { /* fields omitted */ }

A clickable button

Implementations

impl<'a, T: 'a> Button<'a, T>[src]

pub fn new<C: IntoNode<'a, T> + 'a>(state: &'a mut State, content: C) -> Self[src]

Construct a new button

pub fn on_clicked(self, message: T) -> Self[src]

Sets the message to be posted when this button is clicked.

Trait Implementations

impl<'a, T: 'a + Send> IntoNode<'a, T> for Button<'a, T>[src]

impl<'a, T: 'a + Send> Widget<'a, T> for Button<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Button<'a, T>[src]

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

impl<'a, T> !Sync for Button<'a, T>[src]

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

impl<'a, T> !UnwindSafe for Button<'a, T>[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.