[][src]Enum vgtk::UpdateAction

pub enum UpdateAction<C: Component> {
    None,
    Render,
    Defer(Pin<Box<dyn Future<Output = C::Message> + 'static>>),
}

An action resulting from a Component::update().

Variants

None

No action is necessary.

Render

Re-render the widget tree.

Defer(Pin<Box<dyn Future<Output = C::Message> + 'static>>)

Run an async task and update again when it completes, passing the message returned from the Future to Component::update().

You should use UpdateAction::defer() to construct this, rather than trying to box up your Future yourself.

Methods

impl<C: Component> UpdateAction<C>[src]

pub fn defer(job: impl Future<Output = C::Message> + 'static) -> Self[src]

Construct a deferred action given a Future.

Auto Trait Implementations

impl<C> !RefUnwindSafe for UpdateAction<C>

impl<C> !Send for UpdateAction<C>

impl<C> !Sync for UpdateAction<C>

impl<C> Unpin for UpdateAction<C>

impl<C> !UnwindSafe for UpdateAction<C>

Blanket Implementations

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

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, U> Into<U> for T where
    U: From<T>, 
[src]

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.