pub struct ButtonTimings {
pub max_click_hold: Duration,
pub inter_click_gap: Duration,
pub long_press: Duration,
pub very_long_press: Option<Duration>,
}Expand description
Tunable timings; tune on real hardware.
Fields§
§max_click_hold: DurationLongest hold that still counts as a click (rather than a discard or a long-press).
inter_click_gap: DurationMaximum gap from a release to the next press to count as part of the same click sequence.
long_press: DurationContinuous hold duration that triggers ButtonEvent::Long.
very_long_press: Option<Duration>Optional second hold threshold. When present, Long is emitted on
release after long_press, while ButtonEvent::VeryLong fires at
this deadline while the button remains held.
Trait Implementations§
Source§impl Clone for ButtonTimings
impl Clone for ButtonTimings
Source§fn clone(&self) -> ButtonTimings
fn clone(&self) -> ButtonTimings
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ButtonTimings
impl Debug for ButtonTimings
Source§impl Default for ButtonTimings
impl Default for ButtonTimings
impl Copy for ButtonTimings
Auto Trait Implementations§
impl Freeze for ButtonTimings
impl RefUnwindSafe for ButtonTimings
impl Send for ButtonTimings
impl Sync for ButtonTimings
impl Unpin for ButtonTimings
impl UnwindSafe for ButtonTimings
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)