pub struct AnimatedValue<T: Interpolate + Clone> { /* private fields */ }Expand description
Animated value that transitions smoothly
Implementations§
Source§impl<T: Interpolate + Clone> AnimatedValue<T>
impl<T: Interpolate + Clone> AnimatedValue<T>
pub fn new(initial: T, spec: AnimationSpec) -> Self
pub fn set_target(&mut self, target: T)
pub fn update(&mut self) -> bool
pub fn get(&self) -> &T
pub fn is_animating(&self) -> bool
Auto Trait Implementations§
impl<T> Freeze for AnimatedValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for AnimatedValue<T>where
T: RefUnwindSafe,
impl<T> Send for AnimatedValue<T>where
T: Send,
impl<T> Sync for AnimatedValue<T>where
T: Sync,
impl<T> Unpin for AnimatedValue<T>where
T: Unpin,
impl<T> UnwindSafe for AnimatedValue<T>where
T: UnwindSafe,
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