Struct comfy_wgpu::kira::clock::ClockHandle
pub struct ClockHandle { /* private fields */ }Expand description
Controls a clock.
When a ClockHandle is dropped, the corresponding clock
will be removed.
Implementations§
§impl ClockHandle
impl ClockHandle
pub fn fractional_position(&self) -> f64
pub fn fractional_position(&self) -> f64
Returns the time between ticks (from 0.0 to 1.0) of the clock.
A time of 0.5 is halfway between two ticks.
pub fn set_speed(
&self,
speed: impl Into<Value<ClockSpeed>>,
tween: Tween
) -> Result<(), CommandError>
pub fn set_speed( &self, speed: impl Into<Value<ClockSpeed>>, tween: Tween ) -> Result<(), CommandError>
Sets the speed of the clock.
pub fn start(&self) -> Result<(), CommandError>
pub fn start(&self) -> Result<(), CommandError>
Starts or resumes the clock.
pub fn pause(&self) -> Result<(), CommandError>
pub fn pause(&self) -> Result<(), CommandError>
Pauses the clock.
pub fn stop(&self) -> Result<(), CommandError>
pub fn stop(&self) -> Result<(), CommandError>
Stops and resets the clock.
Trait Implementations§
§impl From<&ClockHandle> for ClockId
impl From<&ClockHandle> for ClockId
§fn from(handle: &ClockHandle) -> ClockId
fn from(handle: &ClockHandle) -> ClockId
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for ClockHandle
impl Send for ClockHandle
impl Sync for ClockHandle
impl Unpin for ClockHandle
impl UnwindSafe for ClockHandle
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