Enum pixel_widgets::Command [−][src]
pub enum Command<Message> {
Await(Task<Message>),
Subscribe(Box<dyn Stream<Item = Message> + Send>),
Stylesheet(Task<Result<Style, Error>>),
}Expand description
Some asynchronous work that will update the ui later.
Variants
Await(Task<Message>)Wait for a future to resolve
Handle all messages coming out of stream
Swap the stylesheet
Implementations
impl<Message> Command<Message>[src]
impl<Message> Command<Message>[src]pub fn from_future_message<F: 'static + Future<Output = Message> + Send>(
fut: F
) -> Self[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]
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]
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T