#[non_exhaustive]pub struct TouchConfig {
pub tap_area: DipSize,
pub double_tap_area: DipSize,
pub tap_max_time: Duration,
pub double_tap_max_time: Duration,
pub min_fling_velocity: Dip,
pub max_fling_velocity: Dip,
}
Expand description
System settings needed to implementing touch gestures.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.tap_area: DipSize
Maximum (x, y) distance between a touch start and end that generates a touch click.
Area can be disregarded if the touch is not ambiguous. This usually defines the initial lag for a single finger drag gesture.
double_tap_area: DipSize
Maximum (x, y) distance that a subsequent touch click is linked with the previous one as a double click.
Area can be disregarded if the touch is not ambiguous.
tap_max_time: Duration
Maximum time between start and end in the tap_area
that generates a touch click.
Time can be disregarded if the touch is not ambiguous. This usually defines the long press delay.
double_tap_max_time: Duration
Maximum time between taps that generates a double click.
min_fling_velocity: Dip
Minimum velocity that can be considered a fling gesture, in dip per seconds.
max_fling_velocity: Dip
Fling velocity ceiling, in dip per seconds.
Implementations§
Trait Implementations§
Source§impl Clone for TouchConfig
impl Clone for TouchConfig
Source§fn clone(&self) -> TouchConfig
fn clone(&self) -> TouchConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TouchConfig
impl Debug for TouchConfig
Source§impl Default for TouchConfig
impl Default for TouchConfig
Source§impl<'de> Deserialize<'de> for TouchConfig
impl<'de> Deserialize<'de> for TouchConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TouchConfig
impl PartialEq for TouchConfig
Source§impl Serialize for TouchConfig
impl Serialize for TouchConfig
impl Copy for TouchConfig
impl Eq for TouchConfig
impl StructuralPartialEq for TouchConfig
Auto Trait Implementations§
impl Freeze for TouchConfig
impl RefUnwindSafe for TouchConfig
impl Send for TouchConfig
impl Sync for TouchConfig
impl Unpin for TouchConfig
impl UnwindSafe for TouchConfig
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
and other
are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other
if both are of the same type.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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