pub enum Animation {
Value(AnimatedValue),
Sequence(Vec<Animation>),
Parallel(Vec<Animation>),
Looped(Box<Animation>),
TimeShift(Scalar),
Message(String),
}
Expand description
Defines a widget animation
Animation
’s can be added to widget component’s AnimatorStates
to animate values.
Creating an Animation
doesn’t actually animate a specific value, but instead gives you a way
to track the progress of an animated value using the
value_progress
function. This allows you to use the progress
to calculate how to interpolate the real values when you build your widget.
Variants§
Value(AnimatedValue)
A single animated value with a name and a duration
Sequence(Vec<Animation>)
A sequence of animations that will be run in a row
Parallel(Vec<Animation>)
A set of animations that will be run at the same time
Looped(Box<Animation>)
An animation that will play in a loop
TimeShift(Scalar)
TODO: Document TimeShift
Message(String)
Send an AnimationMessage
Trait Implementations§
source§impl<'de> Deserialize<'de> for Animation
impl<'de> Deserialize<'de> for Animation
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Animation
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnwindSafe for Animation
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
)