pub struct Keyframes<T: Lerp + 'static> { /* private fields */ }Expand description
A signal-backed, autonomous multi-step animation: it plays a fixed sequence rather than chasing a
live target, driven by the same central ticker as crate::Animated.
Implementations§
Source§impl<T: Lerp + 'static> Keyframes<T>
impl<T: Lerp + 'static> Keyframes<T>
Sourcepub fn new(initial: T) -> KeyframesBuilder<T>
pub fn new(initial: T) -> KeyframesBuilder<T>
Start building a sequence resting at initial.
Sourcepub fn read(&self) -> ReadSignal<T>
pub fn read(&self) -> ReadSignal<T>
A read-only handle to the underlying signal.
Sourcepub fn restart(&self)
pub fn restart(&self)
Rewind to t=0 and (re)register with the ticker, whatever the current state.
Sourcepub fn stop(&self)
pub fn stop(&self)
Stop advancing and freeze at the current value; deregisters from the ticker.
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
True only once a Repeat::Once sequence has played through to its last step.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Keyframes<T>
impl<T> !Send for Keyframes<T>
impl<T> !Sync for Keyframes<T>
impl<T> !UnwindSafe for Keyframes<T>
impl<T> Freeze for Keyframes<T>
impl<T> Unpin for Keyframes<T>
impl<T> UnsafeUnpin for Keyframes<T>
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