Skip to main content

Effect

Struct Effect 

Source
pub struct Effect<M> { /* private fields */ }
Expand description

What Widget::update asks for: async work, plus requests to the host.

Implementations§

Source§

impl<M> Effect<M>

Source

pub fn none() -> Self

Source

pub fn task(task: Task<M>) -> Self

Source

pub fn open_popover(self) -> Self

Opens this widget’s popover, under its item. Ignored if the widget has no popover.

Source

pub fn close_popover(self) -> Self

Source

pub fn nudge(self, nudge: Nudge) -> Self

Nudges this widget’s island. Ignored while the island is held or has a popover.

Source

pub fn nudge_lasting(self, nudge: Nudge, lasting: Duration) -> Self

Nudges this widget’s island in step with something else on screen that takes lasting, like the compositor’s own workspace animation: the host plays the same motion, slowed down or sped up to settle over about that long.

Trait Implementations§

Source§

impl<M> From<Task<M>> for Effect<M>

Source§

fn from(task: Task<M>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<M> !RefUnwindSafe for Effect<M>

§

impl<M> !Sync for Effect<M>

§

impl<M> !UnwindSafe for Effect<M>

§

impl<M> Freeze for Effect<M>
where Task<M>: Freeze,

§

impl<M> Send for Effect<M>
where Task<M>: Send,

§

impl<M> Unpin for Effect<M>
where Task<M>: Unpin,

§

impl<M> UnsafeUnpin for Effect<M>
where Task<M>: UnsafeUnpin,

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<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.