pub enum ReplaySpeed {
Slowest,
Slower,
Slow,
Normal,
Fast,
Faster,
VeryFast,
Fastest,
Turbo,
Max,
Custom(f32),
}Expand description
Predefined speed presets for replay
Variants§
Slowest
0.1x speed (very slow)
Slower
0.25x speed
Slow
0.5x speed
Normal
1x speed (real-time)
Fast
2x speed
Faster
5x speed
VeryFast
10x speed
Fastest
25x speed
Turbo
50x speed
Max
100x speed (max)
Custom(f32)
Custom speed multiplier, clamped to 0.1 to 100; a value that is not finite plays at 1x
Implementations§
Source§impl ReplaySpeed
impl ReplaySpeed
Sourcepub fn multiplier(&self) -> f32
pub fn multiplier(&self) -> f32
Get the speed multiplier value; a custom speed is clamped to 0.1 to 100, and plays at 1x when it is not finite
Sourcepub fn presets() -> &'static [ReplaySpeed]
pub fn presets() -> &'static [ReplaySpeed]
All standard presets
Trait Implementations§
Source§impl Clone for ReplaySpeed
impl Clone for ReplaySpeed
Source§fn clone(&self) -> ReplaySpeed
fn clone(&self) -> ReplaySpeed
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ReplaySpeed
Source§impl Debug for ReplaySpeed
impl Debug for ReplaySpeed
Source§impl Default for ReplaySpeed
impl Default for ReplaySpeed
Source§fn default() -> ReplaySpeed
fn default() -> ReplaySpeed
Returns the “default value” for a type. Read more
Source§impl From<f32> for ReplaySpeed
impl From<f32> for ReplaySpeed
Source§impl PartialEq for ReplaySpeed
impl PartialEq for ReplaySpeed
impl StructuralPartialEq for ReplaySpeed
Auto Trait Implementations§
impl Freeze for ReplaySpeed
impl RefUnwindSafe for ReplaySpeed
impl Send for ReplaySpeed
impl Sync for ReplaySpeed
impl Unpin for ReplaySpeed
impl UnsafeUnpin for ReplaySpeed
impl UnwindSafe for ReplaySpeed
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> 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> ⓘ
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