pub struct Keyframes { /* private fields */ }Expand description
A looping keyframe timeline: style stops at fractional times across one
period, sampled from the frame clock every frame. Built for ambient
motion (pulses, shimmers, breathing); one-shot state changes belong to
Transition. With reduced motion the first stop is pinned, keeping
headless renders deterministic.
Implementations§
Source§impl Keyframes
impl Keyframes
Sourcepub fn stop(self, at: f32, f: impl Fn(Style) -> Style + 'static) -> Keyframes
pub fn stop(self, at: f32, f: impl Fn(Style) -> Style + 'static) -> Keyframes
Adds a stop at fraction at (clamped to 0..=1) transforming the
element’s resolved base style. For a seamless loop, make the styles
at 0 and 1 match.
Sourcepub fn themed_stop(
self,
at: f32,
f: impl Fn(&Theme, Style) -> Style + 'static,
) -> Keyframes
pub fn themed_stop( self, at: f32, f: impl Fn(&Theme, Style) -> Style + 'static, ) -> Keyframes
A theme-aware stop, for keyframes that color through tokens.
Sourcepub fn ease(self, easing: CubicBezier) -> Keyframes
pub fn ease(self, easing: CubicBezier) -> Keyframes
Per-segment easing (standard ease by default).
Auto Trait Implementations§
impl !RefUnwindSafe for Keyframes
impl !Send for Keyframes
impl !Sync for Keyframes
impl !UnwindSafe for Keyframes
impl Freeze for Keyframes
impl Unpin for Keyframes
impl UnsafeUnpin for Keyframes
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.