pub struct AnimationClock(/* private fields */);Expand description
Controls the animation speed of this window.
Implementations§
Source§impl AnimationClock
impl AnimationClock
Sourcepub const DEFAULT_SPEED: f32 = 1.0
pub const DEFAULT_SPEED: f32 = 1.0
Normal speed.
Sourcepub const DISABLED_SPEED: f32 = 999_999_999.0
pub const DISABLED_SPEED: f32 = 999_999_999.0
Speed that makes animations finish instantly.
Sourcepub fn get() -> Self
pub fn get() -> Self
Retrieve the current AnimationClock from the root context.
Sourcepub fn correct_elapsed_duration(&self, elapsed: Duration) -> Duration
pub fn correct_elapsed_duration(&self, elapsed: Duration) -> Duration
Scale a duration by the current speed.
Trait Implementations§
Auto Trait Implementations§
impl Forget for AnimationClock
impl Freeze for AnimationClock
impl RefUnwindSafe for AnimationClock
impl Send for AnimationClock
impl Sync for AnimationClock
impl Unpin for AnimationClock
impl UnsafeUnpin for AnimationClock
impl UnwindSafe for AnimationClock
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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