pub struct AnimatedValue { /* private fields */ }Expand description
State for animating a single f64 value
Implementations§
Source§impl AnimatedValue
impl AnimatedValue
Sourcepub fn with_easing(self, easing: EasingFn) -> Self
pub fn with_easing(self, easing: EasingFn) -> Self
Set the easing function
Sourcepub fn with_duration(self, duration: f64) -> Self
pub fn with_duration(self, duration: f64) -> Self
Set animation duration
Sourcepub fn animate_to(&mut self, target: f64, time: f64)
pub fn animate_to(&mut self, target: f64, time: f64)
Set a new target and start animation
Sourcepub fn is_animating(&self, time: f64) -> bool
pub fn is_animating(&self, time: f64) -> bool
Check if animation is in progress
Trait Implementations§
Source§impl Clone for AnimatedValue
impl Clone for AnimatedValue
Source§fn clone(&self) -> AnimatedValue
fn clone(&self) -> AnimatedValue
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 moreAuto Trait Implementations§
impl Freeze for AnimatedValue
impl RefUnwindSafe for AnimatedValue
impl Send for AnimatedValue
impl Sync for AnimatedValue
impl Unpin for AnimatedValue
impl UnsafeUnpin for AnimatedValue
impl UnwindSafe for AnimatedValue
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