pub enum AnimValue {
Float(f32),
Color(Color),
}Expand description
A value the animator can interpolate. Each variant fans out to a fixed number of f32 channels that the integrator steps independently.
Variants§
Implementations§
Source§impl AnimValue
impl AnimValue
pub fn channels(self) -> AnimChannels
Sourcepub fn from_channels(self, ch: AnimChannels) -> AnimValue
pub fn from_channels(self, ch: AnimChannels) -> AnimValue
Reconstruct an AnimValue of the same variant from sampled
channels. The token name is dropped — an in-flight interpolated
rgba doesn’t equal any palette token’s rgb, so carrying a name
on it would mislead palette resolution. When the animation
settles, step_spring / step_tween assign
self.current = self.target directly, restoring the target’s
token on the final value.
Trait Implementations§
impl Copy for AnimValue
impl StructuralPartialEq for AnimValue
Auto Trait Implementations§
impl Freeze for AnimValue
impl RefUnwindSafe for AnimValue
impl Send for AnimValue
impl Sync for AnimValue
impl Unpin for AnimValue
impl UnsafeUnpin for AnimValue
impl UnwindSafe for AnimValue
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.