pub struct Playing { /* private fields */ }Expand description
A started Animation: stop it, reset it, ask how it went, or await its end.
The animation does not depend on the handle: dropping it leaves the animation running, and
it stops by itself when a value it moves is disposed. Awaiting the handle answers
Outcome::Finished when the animation played to its end and Outcome::Stopped when
something ended it first.
Implementations§
Source§impl Playing
impl Playing
Sourcepub fn stop(&self) -> bool
pub fn stop(&self) -> bool
Stops the animation where it stands; its values keep what they show. Answers whether it was still running.
Sourcepub fn reset(&self)
pub fn reset(&self)
Stops the animation and puts every value it moves back where it was when it started.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Whether the animation is still playing.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Whether the animation played to its end.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Playing
impl !Send for Playing
impl !Sync for Playing
impl !UnwindSafe for Playing
impl Forget for Playing
impl Freeze for Playing
impl Move for Playing
impl Unpin for Playing
impl UnsafeUnpin for Playing
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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