Enum comfy_wgpu::kira::clock::ClockSpeed
pub enum ClockSpeed {
SecondsPerTick(f64),
TicksPerSecond(f64),
TicksPerMinute(f64),
}Expand description
The rate that a clock ticks at.
Variants§
SecondsPerTick(f64)
The clock ticks every x seconds.
TicksPerSecond(f64)
The clock ticks x times per second.
TicksPerMinute(f64)
The clock ticks x times per minute.
Implementations§
§impl ClockSpeed
impl ClockSpeed
pub fn as_seconds_per_tick(&self) -> f64
pub fn as_seconds_per_tick(&self) -> f64
Returns the ClockSpeed as a number of seconds between each tick.
pub fn as_ticks_per_second(&self) -> f64
pub fn as_ticks_per_second(&self) -> f64
Returns the ClockSpeed as a number of ticks per second.
pub fn as_ticks_per_minute(&self) -> f64
pub fn as_ticks_per_minute(&self) -> f64
Returns the ClockSpeed as a number of ticks per minute.
Trait Implementations§
§impl Clone for ClockSpeed
impl Clone for ClockSpeed
§fn clone(&self) -> ClockSpeed
fn clone(&self) -> ClockSpeed
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ClockSpeed
impl Debug for ClockSpeed
§impl From<ClockSpeed> for Value<ClockSpeed>
impl From<ClockSpeed> for Value<ClockSpeed>
§fn from(clock_speed: ClockSpeed) -> Value<ClockSpeed>
fn from(clock_speed: ClockSpeed) -> Value<ClockSpeed>
Converts to this type from the input type.
§impl PartialEq<ClockSpeed> for ClockSpeed
impl PartialEq<ClockSpeed> for ClockSpeed
§fn eq(&self, other: &ClockSpeed) -> bool
fn eq(&self, other: &ClockSpeed) -> bool
This method tests for
self and other values to be equal, and is used
by ==.§impl Tweenable for ClockSpeed
impl Tweenable for ClockSpeed
§fn interpolate(a: ClockSpeed, b: ClockSpeed, amount: f64) -> ClockSpeed
fn interpolate(a: ClockSpeed, b: ClockSpeed, amount: f64) -> ClockSpeed
impl Copy for ClockSpeed
impl StructuralPartialEq for ClockSpeed
Auto Trait Implementations§
impl RefUnwindSafe for ClockSpeed
impl Send for ClockSpeed
impl Sync for ClockSpeed
impl Unpin for ClockSpeed
impl UnwindSafe for ClockSpeed
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