pub enum AnimationValue {
Number(f64),
Pixels(f64),
Percentage(f64),
Degrees(f64),
Radians(f64),
Color(String),
Transform(Transform),
String(String),
Complex(ComplexValue),
}Expand description
Animation value types that can be animated
Variants§
Number(f64)
Numeric value (unitless)
Pixels(f64)
Pixel value
Percentage(f64)
Percentage value
Degrees(f64)
Degree value for rotations
Radians(f64)
Radians value for rotations
Color(String)
Color value (CSS format)
Transform(Transform)
Transform matrix
String(String)
String value for non-numeric properties
Complex(ComplexValue)
Complex value with custom interpolation
Implementations§
Source§impl AnimationValue
impl AnimationValue
Sourcepub fn to_string_value(&self) -> String
pub fn to_string_value(&self) -> String
Convert animation value to string representation
Sourcepub fn interpolate(
&self,
other: &AnimationValue,
progress: f64,
) -> AnimationValue
pub fn interpolate( &self, other: &AnimationValue, progress: f64, ) -> AnimationValue
Interpolate between two animation values
Trait Implementations§
Source§impl Clone for AnimationValue
impl Clone for AnimationValue
Source§fn clone(&self) -> AnimationValue
fn clone(&self) -> AnimationValue
Returns a duplicate 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 AnimationValue
impl Debug for AnimationValue
Source§impl Interpolate for AnimationValue
impl Interpolate for AnimationValue
Source§fn interpolate(&self, to: &AnimationValue, progress: f64) -> AnimationValue
fn interpolate(&self, to: &AnimationValue, progress: f64) -> AnimationValue
Interpolate between two values at given progress (0.0 to 1.0)
Source§impl PartialEq for AnimationValue
impl PartialEq for AnimationValue
impl StructuralPartialEq for AnimationValue
Auto Trait Implementations§
impl Freeze for AnimationValue
impl RefUnwindSafe for AnimationValue
impl Send for AnimationValue
impl Sync for AnimationValue
impl Unpin for AnimationValue
impl UnwindSafe for AnimationValue
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§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> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.