pub struct AnimationTask { /* private fields */ }Expand description
The pending or completed result of running an animation or a page transition.
It completes with Ok when the animation has ended or was cancelled,
and with an error when the animation could not be run.
Implementations§
Source§impl AnimationTask
impl AnimationTask
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Whether the task has completed, successfully or not.
Sourcepub fn result(&self) -> Option<Result<(), AnimationError>>
pub fn result(&self) -> Option<Result<(), AnimationError>>
The result of the task; None while it is pending.
Sourcepub fn on_completed(&self, continuation: impl FnOnce() + 'static)
pub fn on_completed(&self, continuation: impl FnOnce() + 'static)
Runs continuation when the task completes; immediately if it has
completed already.
Sourcepub fn when_all(tasks: impl IntoIterator<Item = AnimationTask>) -> AnimationTask ⓘ
pub fn when_all(tasks: impl IntoIterator<Item = AnimationTask>) -> AnimationTask ⓘ
A task that completes when all of tasks have completed: with the
first error among them, if any.
Trait Implementations§
Source§impl Clone for AnimationTask
impl Clone for AnimationTask
Source§impl Default for AnimationTask
impl Default for AnimationTask
Source§impl Future for AnimationTask
impl Future for AnimationTask
Auto Trait Implementations§
impl !RefUnwindSafe for AnimationTask
impl !Send for AnimationTask
impl !Sync for AnimationTask
impl !UnwindSafe for AnimationTask
impl Freeze for AnimationTask
impl Unpin for AnimationTask
impl UnsafeUnpin for AnimationTask
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more