pub struct Animation<I, X: Time, T: Keyframes<I, X>> { /* private fields */ }Expand description
Running keyframes animation started at a specific time.
Implementations§
Source§impl<I, X: Time, T: Keyframes<I, X>> Animation<I, X, T>
impl<I, X: Time, T: Keyframes<I, X>> Animation<I, X, T>
Sourcepub fn start(keyframes: T, start_time: X) -> Self
pub fn start(keyframes: T, start_time: X) -> Self
Start the animation at a specific time.
keyframes- The transition to animate.start_time- The time to start the animation, usuallyInstant::now().
Sourcepub fn start_time(&self) -> X
pub fn start_time(&self) -> X
Get the start time of the animation.
Trait Implementations§
Source§impl<I, X: Time, T: Keyframes<I, X>> Animated<I, X> for Animation<I, X, T>
impl<I, X: Time, T: Keyframes<I, X>> Animated<I, X> for Animation<I, X, T>
Source§fn is_finished(&self, time: X) -> bool
fn is_finished(&self, time: X) -> bool
Check if the animation is finished at a specific time.
Source§fn map<R, F: Fn(T) -> R>(self, map: F) -> AnimatedMap<T, X, Self, R, F>where
Self: Sized,
fn map<R, F: Fn(T) -> R>(self, map: F) -> AnimatedMap<T, X, Self, R, F>where
Self: Sized,
Map the animated value to another type.
impl<I, X: Time, T: Keyframes<I, X> + Copy> Copy for Animation<I, X, T>
Auto Trait Implementations§
impl<I, X, T> Freeze for Animation<I, X, T>
impl<I, X, T> RefUnwindSafe for Animation<I, X, T>
impl<I, X, T> Send for Animation<I, X, T>
impl<I, X, T> Sync for Animation<I, X, T>
impl<I, X, T> Unpin for Animation<I, X, T>
impl<I, X, T> UnwindSafe for Animation<I, X, T>
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