pub struct ClockHandle { /* private fields */ }Expand description
Controls a clock.
When a ClockHandle is dropped, the corresponding clock
will be removed.
Implementations§
Source§impl ClockHandle
impl ClockHandle
Sourcepub 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.
Sourcepub 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.
Sourcepub fn start(&self) -> Result<(), CommandError>
pub fn start(&self) -> Result<(), CommandError>
Starts or resumes the clock.
Sourcepub fn pause(&self) -> Result<(), CommandError>
pub fn pause(&self) -> Result<(), CommandError>
Pauses the clock.
Sourcepub fn stop(&self) -> Result<(), CommandError>
pub fn stop(&self) -> Result<(), CommandError>
Stops and resets the clock.
Trait Implementations§
Source§impl Drop for ClockHandle
impl Drop for ClockHandle
Source§impl From<&ClockHandle> for ClockId
impl From<&ClockHandle> for ClockId
Source§fn from(handle: &ClockHandle) -> ClockId
fn from(handle: &ClockHandle) -> ClockId
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ClockHandle
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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