[][src]Enum pixel_widgets::Command

pub enum Command<Message> {
    Await(Box<dyn Future<Output = Message> + Send>),
    Subscribe(Box<dyn Stream<Item = Message> + Send>),
    Stylesheet(Box<dyn Future<Output = Result<Style, Error>> + Send>),
}

Some asynchronous work that will update the ui later.

Variants

Await(Box<dyn Future<Output = Message> + Send>)

Wait for a future to resolve

Subscribe(Box<dyn Stream<Item = Message> + Send>)

Handle all messages coming out of stream

Stylesheet(Box<dyn Future<Output = Result<Style, Error>> + Send>)

Swap the stylesheet

Implementations

impl<Message> Command<Message>[src]

pub fn from_future_message<F: 'static + Future<Output = Message> + Send>(
    fut: F
) -> Self
[src]

Construct a new command from a future that generates a message. The message will be handled as soon as it is available.

pub fn from_future_style<F: 'static + Future<Output = Result<Style, Error>> + Send>(
    fut: F
) -> Self
[src]

Construct a new command that will replace the style of the Ui after it completes.

pub fn from_stream<S: 'static + Stream<Item = Message> + Send>(
    stream: S
) -> Self
[src]

Construct a new command from a stream of messages. Each message will be handled as soon as it's available.

Auto Trait Implementations

impl<Message> !RefUnwindSafe for Command<Message>

impl<Message> Send for Command<Message>

impl<Message> !Sync for Command<Message>

impl<Message> Unpin for Command<Message>

impl<Message> !UnwindSafe for Command<Message>

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.