pub struct AnimationData {
pub from: CssProperty,
pub to: CssProperty,
pub start: Instant,
pub duration: Duration,
pub repeat: AnimationRepeat,
pub interpolate: AnimationInterpolationFunction,
pub relayout_on_finish: bool,
pub parent_rect_width: f32,
pub parent_rect_height: f32,
pub current_rect_width: f32,
pub current_rect_height: f32,
pub get_system_time_fn: GetSystemTimeCallback,
}Expand description
Holds the dynamic, runtime state of an active animation instance.
This is created when an Animation begins playing.
Fields§
§from: CssPropertyThe starting CssProperty value of the animation.
to: CssPropertyThe target CssProperty value at the end of the animation.
start: InstantThe timestamp marking when the animation began.
duration: DurationThe total time the animation takes to complete one cycle.
repeat: AnimationRepeatThe repetition behavior of the animation (e.g., loop, ping-pong).
interpolate: AnimationInterpolationFunctionThe easing function used to control the animation’s pacing.
relayout_on_finish: boolIf true, a relayout is triggered after the animation finishes.
parent_rect_width: f32The width of the parent’s bounding rectangle at the animation’s start.
parent_rect_height: f32The height of the parent’s bounding rectangle at the animation’s start.
current_rect_width: f32The width of the animated element’s bounding rectangle at the animation’s start.
current_rect_height: f32The height of the animated element’s bounding rectangle at the animation’s start.
get_system_time_fn: GetSystemTimeCallbackA callback function used to get the current system time for synchronized timing.
Trait Implementations§
Source§impl Clone for AnimationData
impl Clone for AnimationData
Source§fn clone(&self) -> AnimationData
fn clone(&self) -> AnimationData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnimationData
impl Debug for AnimationData
Source§impl PartialEq for AnimationData
impl PartialEq for AnimationData
impl StructuralPartialEq for AnimationData
Auto Trait Implementations§
impl Freeze for AnimationData
impl RefUnwindSafe for AnimationData
impl Send for AnimationData
impl Sync for AnimationData
impl Unpin for AnimationData
impl UnwindSafe for AnimationData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more