pub struct MomentumSnap {
pub spacing: Option<f64>,
pub offset: Option<f64>,
pub tolerance: Option<f64>,
pub duration_ms: Option<f64>,
}Expand description
Where a part settles after a gesture that changed it.
The targets are every spacing from offset, in the part’s unit. Bearing
targets wrap around the circle. Once the part’s glide ends, or right away
when it doesn’t move, the part eases to the nearest target if it is within
tolerance of it, and otherwise stays where it is. A setting whose bit
isn’t set takes the part’s default, which GestureMomentum lists.
See mln_momentum_snap in the
C API reference.
Fields§
§spacing: Option<f64>Positive.
offset: Option<f64>Defaults to 0.
tolerance: Option<f64>Not negative.
duration_ms: Option<f64>Zero settles without easing. Defaults to 300.
Trait Implementations§
Source§impl Clone for MomentumSnap
impl Clone for MomentumSnap
Source§fn clone(&self) -> MomentumSnap
fn clone(&self) -> MomentumSnap
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 MomentumSnap
Source§impl Debug for MomentumSnap
impl Debug for MomentumSnap
Source§impl Default for MomentumSnap
impl Default for MomentumSnap
Source§fn default() -> MomentumSnap
fn default() -> MomentumSnap
Returns the “default value” for a type. Read more
Source§impl PartialEq for MomentumSnap
impl PartialEq for MomentumSnap
impl StructuralPartialEq for MomentumSnap
Auto Trait Implementations§
impl Freeze for MomentumSnap
impl RefUnwindSafe for MomentumSnap
impl Send for MomentumSnap
impl Sync for MomentumSnap
impl Unpin for MomentumSnap
impl UnsafeUnpin for MomentumSnap
impl UnwindSafe for MomentumSnap
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