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>
impl<M> Effect<M>
pub fn none() -> Self
pub fn task(task: Task<M>) -> Self
Sourcepub fn and_task(self, task: Task<M>) -> Selfwhere
M: Send + 'static,
pub fn and_task(self, task: Task<M>) -> Selfwhere
M: Send + 'static,
Runs task too, alongside the one it has.
Sourcepub fn open_popover(self) -> Self
pub fn open_popover(self) -> Self
Opens this widget’s popover, under its item. Ignored if the widget has no popover. Before the item was ever clicked, it opens on the bar the notifications show on.
pub fn close_popover(self) -> Self
Sourcepub fn open_dialog(self) -> Self
pub fn open_dialog(self) -> Self
Opens this widget’s dialog: its panel in the middle of the screen, for what needs more room than a popover. Ignored if the widget has no dialog.
The host picks where it comes from: out of what was just acted on (the popover, which folds away, the item, a notification or the dormer), or out of the top of the screen, and it goes back there when it closes. Opening it closes any popover and the dormer.
pub fn close_dialog(self) -> Self
Sourcepub fn nudge(self, nudge: Nudge) -> Self
pub fn nudge(self, nudge: Nudge) -> Self
Nudges this widget’s island. Ignored while the island is held or has a popover.
Sourcepub fn nudge_lasting(self, nudge: Nudge, lasting: Duration) -> Self
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.