pub struct KeyFrame { /* private fields */ }Expand description
Holds the style properties for a keyframe as well as the easing function that should be used when animating towards this frame
Implementations§
Source§impl KeyFrame
impl KeyFrame
Sourcepub fn computed_style(self) -> Self
pub fn computed_style(self) -> Self
Set this keyframe to pull its props from the computed style. The will completely overwrite any previously applied styles to this keyframe.
Sourcepub fn ease(self, easing: impl Easing + 'static) -> Self
pub fn ease(self, easing: impl Easing + 'static) -> Self
This easing function will be used while animating towards this keyframe
Sourcepub fn ease_in_out(self) -> Self
pub fn ease_in_out(self) -> Self
Sets the easing function to the bezier ease in and out
Sourcepub fn ease_spring(self) -> Self
pub fn ease_spring(self) -> Self
Sets the easing function to the default spring
Sourcepub fn ease_linear(self) -> Self
pub fn ease_linear(self) -> Self
Sets the easing function to a linear easing
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyFrame
impl !RefUnwindSafe for KeyFrame
impl !Send for KeyFrame
impl !Sync for KeyFrame
impl Unpin for KeyFrame
impl !UnwindSafe for KeyFrame
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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