Skip to main content

Effect

Enum Effect 

Source
pub enum Effect {
    Focus(u64),
    Scroll(u64, ScrollTo),
    Sheet(u64, SheetTo),
    Spawn(Box<dyn FnOnce() -> Option<Callback> + Send>),
    After(Duration, Callback),
    Async(Task),
}
Expand description

A request to the shell that is not a widget: something to do once.

Variants§

§

Focus(u64)

Focus the widget wrapped in keyed(key, …) — the hash of its key.

§

Scroll(u64, ScrollTo)

Move the scroll region named by the hash of a key.

§

Sheet(u64, SheetTo)

Move the sheet named by the hash of a key.

§

Spawn(Box<dyn FnOnce() -> Option<Callback> + Send>)

Run this on another thread; if it answers with a callback, that callback runs on the interface’s thread.

§

After(Duration, Callback)

Run this callback after a delay.

§

Async(Task)

Await this; if it answers with a callback, that callback runs on the interface’s thread.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Effect

§

impl !Sync for Effect

§

impl !UnwindSafe for Effect

§

impl Freeze for Effect

§

impl Send for Effect

§

impl Unpin for Effect

§

impl UnsafeUnpin for Effect

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Msg> IntoMsg<Msg> for Msg

Source§

fn defer(work: impl Fn() -> Msg + 'static) -> Msg

The message that stands for work’s result.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.