#[non_exhaustive]pub struct KeyframeTiming {
pub duration_ms: f32,
pub delay_ms: f32,
pub easing: Easing,
pub iterations: Option<u32>,
pub direction: PlaybackDirection,
pub frame_rate: Option<f32>,
}Expand description
How keyframes play (CSS animation-duration, -delay,
-timing-function, -iteration-count and -direction).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.duration_ms: f32One iteration, in milliseconds.
delay_ms: f32Before the first iteration, in milliseconds.
easing: EasingThe curve of each segment without one of its own (CSS ease by
default; as in CSS it shapes every segment, not the whole).
iterations: Option<u32>How many iterations; None repeats until stopped.
direction: PlaybackDirectionWhich way the iterations play.
frame_rate: Option<f32>The highest frame rate it needs, in Hz (super::Driver::frame_rate);
None: the screen’s highest.
Implementations§
Source§impl KeyframeTiming
impl KeyframeTiming
Sourcepub fn iterations(self, iterations: Option<u32>) -> Self
pub fn iterations(self, iterations: Option<u32>) -> Self
iterations times (None: until stopped).
Sourcepub fn direction(self, direction: PlaybackDirection) -> Self
pub fn direction(self, direction: PlaybackDirection) -> Self
Playing in direction.
Sourcepub fn frame_rate(self, hz: f32) -> Self
pub fn frame_rate(self, hz: f32) -> Self
Needing at most hz frames per second.
Trait Implementations§
Source§impl Clone for KeyframeTiming
impl Clone for KeyframeTiming
impl Copy for KeyframeTiming
Source§impl Debug for KeyframeTiming
impl Debug for KeyframeTiming
Source§impl Default for KeyframeTiming
impl Default for KeyframeTiming
Source§impl PartialEq for KeyframeTiming
impl PartialEq for KeyframeTiming
impl StructuralPartialEq for KeyframeTiming
Auto Trait Implementations§
impl Forget for KeyframeTiming
impl Freeze for KeyframeTiming
impl Move for KeyframeTiming
impl RefUnwindSafe for KeyframeTiming
impl Send for KeyframeTiming
impl Sync for KeyframeTiming
impl Unpin for KeyframeTiming
impl UnsafeUnpin for KeyframeTiming
impl UnwindSafe for KeyframeTiming
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