pub enum MomentumDecayModel {
Friction,
Ease,
Unknown(u32),
}Expand description
How a part of a gesture’s momentum slows from its release speed.
See mln_momentum_decay_model in the
C API reference.
Variants§
Friction
The speed halves every half_life_ms, until it drops to stop_speed.
UIScrollView’s normal deceleration is a half-life of 346 ms, and its
fast deceleration 69 ms.
Ease
The part eases distance over duration_ms, along easing, as a
camera animation does. The caller plans the glide, for example from the
platform’s own fling physics, such as Android’s OverScroller.
Unknown(u32)
Implementations§
Trait Implementations§
Source§impl Clone for MomentumDecayModel
impl Clone for MomentumDecayModel
Source§fn clone(&self) -> MomentumDecayModel
fn clone(&self) -> MomentumDecayModel
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 MomentumDecayModel
Source§impl Debug for MomentumDecayModel
impl Debug for MomentumDecayModel
Source§impl Default for MomentumDecayModel
impl Default for MomentumDecayModel
impl Eq for MomentumDecayModel
Source§impl Hash for MomentumDecayModel
impl Hash for MomentumDecayModel
Source§impl PartialEq for MomentumDecayModel
impl PartialEq for MomentumDecayModel
impl StructuralPartialEq for MomentumDecayModel
Auto Trait Implementations§
impl Freeze for MomentumDecayModel
impl RefUnwindSafe for MomentumDecayModel
impl Send for MomentumDecayModel
impl Sync for MomentumDecayModel
impl Unpin for MomentumDecayModel
impl UnsafeUnpin for MomentumDecayModel
impl UnwindSafe for MomentumDecayModel
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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