Enum style::animation::AnimationState
source · pub enum AnimationState {
Pending,
Running,
Paused(f64),
Finished,
Canceled,
}
Expand description
This structure represents the state of an animation.
Variants§
Pending
The animation has been created, but is not running yet. This state is also used when an animation is still in the first delay phase.
Running
This animation is currently running.
Paused(f64)
This animation is paused. The inner field is the percentage of progress when it was paused, from 0 to 1.
Finished
This animation has finished.
Canceled
This animation has been canceled.
Implementations§
source§impl AnimationState
impl AnimationState
sourcefn needs_to_be_ticked(&self) -> bool
fn needs_to_be_ticked(&self) -> bool
Whether or not this state requires its owning animation to be ticked.
Trait Implementations§
source§impl Clone for AnimationState
impl Clone for AnimationState
source§fn clone(&self) -> AnimationState
fn clone(&self) -> AnimationState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnimationState
impl Debug for AnimationState
source§impl MallocSizeOf for AnimationState
impl MallocSizeOf for AnimationState
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for AnimationState
impl PartialEq for AnimationState
impl StructuralPartialEq for AnimationState
Auto Trait Implementations§
impl Freeze for AnimationState
impl RefUnwindSafe for AnimationState
impl Send for AnimationState
impl Sync for AnimationState
impl Unpin for AnimationState
impl UnwindSafe for AnimationState
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert