pub struct AnimationSnapshot {
pub id: AnimationId,
pub label: Option<String>,
pub kind: AnimationKind,
pub progress: f32,
pub elapsed: f32,
pub duration: Option<f32>,
pub state: PlaybackState,
pub easing: Option<Easing>,
}Expand description
Snapshot of one running animation for DevTools rendering.
Fields§
§id: AnimationIdStable animation id returned by the driver.
label: Option<String>Optional user-facing label.
kind: AnimationKindHigh-level animation category.
progress: f32Normalized progress in [0.0, 1.0].
elapsed: f32Elapsed seconds.
duration: Option<f32>Finite duration in seconds, if known.
state: PlaybackStateCoarse playback state.
easing: Option<Easing>Active easing curve, if applicable.
Implementations§
Source§impl AnimationSnapshot
impl AnimationSnapshot
Sourcepub fn color_name(&self) -> &'static str
pub fn color_name(&self) -> &'static str
Return a stable color name for the animation kind.
Sourcepub fn progress_bar(&self, width: usize) -> String
pub fn progress_bar(&self, width: usize) -> String
Render an ASCII progress bar with a stable width.
Trait Implementations§
Source§impl Clone for AnimationSnapshot
impl Clone for AnimationSnapshot
Source§fn clone(&self) -> AnimationSnapshot
fn clone(&self) -> AnimationSnapshot
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 AnimationSnapshot
impl Debug for AnimationSnapshot
Source§impl PartialEq for AnimationSnapshot
impl PartialEq for AnimationSnapshot
impl StructuralPartialEq for AnimationSnapshot
Auto Trait Implementations§
impl Freeze for AnimationSnapshot
impl RefUnwindSafe for AnimationSnapshot
impl Send for AnimationSnapshot
impl Sync for AnimationSnapshot
impl Unpin for AnimationSnapshot
impl UnsafeUnpin for AnimationSnapshot
impl UnwindSafe for AnimationSnapshot
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