pub struct AnimationIntrospection {
pub kind: AnimationKind,
pub progress: f32,
pub elapsed: f32,
pub duration: Option<f32>,
pub state: PlaybackState,
pub easing: Option<Easing>,
}Expand description
Renderer-agnostic runtime state for a single animation.
Fields§
§kind: AnimationKindHigh-level animation category.
progress: f32Normalized progress in [0.0, 1.0] when available.
elapsed: f32Elapsed seconds reported by the animation.
duration: Option<f32>Finite duration in seconds, or None for unbounded animations such as springs.
state: PlaybackStateCoarse playback state.
easing: Option<Easing>Active easing curve when the animation has one.
Implementations§
Source§impl AnimationIntrospection
impl AnimationIntrospection
Sourcepub fn new(
kind: AnimationKind,
progress: f32,
elapsed: f32,
duration: Option<f32>,
state: PlaybackState,
easing: Option<Easing>,
) -> Self
pub fn new( kind: AnimationKind, progress: f32, elapsed: f32, duration: Option<f32>, state: PlaybackState, easing: Option<Easing>, ) -> Self
Create a sanitized introspection record.
Trait Implementations§
Source§impl Clone for AnimationIntrospection
impl Clone for AnimationIntrospection
Source§fn clone(&self) -> AnimationIntrospection
fn clone(&self) -> AnimationIntrospection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnimationIntrospection
impl Debug for AnimationIntrospection
Source§impl PartialEq for AnimationIntrospection
impl PartialEq for AnimationIntrospection
Source§fn eq(&self, other: &AnimationIntrospection) -> bool
fn eq(&self, other: &AnimationIntrospection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AnimationIntrospection
Auto Trait Implementations§
impl Freeze for AnimationIntrospection
impl RefUnwindSafe for AnimationIntrospection
impl Send for AnimationIntrospection
impl Sync for AnimationIntrospection
impl Unpin for AnimationIntrospection
impl UnsafeUnpin for AnimationIntrospection
impl UnwindSafe for AnimationIntrospection
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