pub struct Animation<I: Clone + Debug + Sized, T: Transition<I>> { /* private fields */ }Expand description
Transition started at a specific time.
Implementations§
source§impl<I: Clone + Debug + Sized, T: Transition<I>> Animation<I, T>
impl<I: Clone + Debug + Sized, T: Transition<I>> Animation<I, T>
sourcepub fn start(transition: T, start_time: SystemTime) -> Self
pub fn start(transition: T, start_time: SystemTime) -> Self
Start the animation at a specific time.
transition- The transition to animate.start_time- The time to start the animation, usuallySystemTime::now().
sourcepub fn is_finished(&self, current_time: SystemTime) -> bool
pub fn is_finished(&self, current_time: SystemTime) -> bool
Check if the animation is finished at a specific time.
sourcepub fn start_time(&self) -> SystemTime
pub fn start_time(&self) -> SystemTime
Get the start time of the animation.
sourcepub fn end_time(&self) -> SystemTime
pub fn end_time(&self) -> SystemTime
Get the end time of the animation. Infinite animations will panic.
sourcepub fn get(&self, time: SystemTime) -> I
pub fn get(&self, time: SystemTime) -> I
Get the value of the animation at a specific time.
time- The time to get the value of the animation, usuallySystemTime::now().
Trait Implementations§
Auto Trait Implementations§
impl<I, T> Freeze for Animation<I, T>where
T: Freeze,
impl<I, T> RefUnwindSafe for Animation<I, T>where
T: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, T> Send for Animation<I, T>
impl<I, T> Sync for Animation<I, T>
impl<I, T> Unpin for Animation<I, T>
impl<I, T> UnwindSafe for Animation<I, T>where
T: UnwindSafe,
I: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)