pub struct ButtonUpdate {
pub state: ButtonState,
pub events: ButtonEvents,
pub held_ms: Option<Millis>,
pub released_after_ms: Option<Millis>,
pub multi_click_count: u8,
}Expand description
Result of one button update.
Fields§
§state: ButtonStateCurrent stable debounced state after the update.
events: ButtonEventsEvents produced by this update.
held_ms: Option<Millis>Current hold time while the button is pressed.
released_after_ms: Option<Millis>Total hold time when this update released the button.
multi_click_count: u8Current short-click count in the active multi-click sequence.
The value is 0 when the detector is disabled or no sequence is active.
When ButtonEvents::multi_click is true, this field reports the
target count that fired the event.
Trait Implementations§
Source§impl Clone for ButtonUpdate
impl Clone for ButtonUpdate
Source§fn clone(&self) -> ButtonUpdate
fn clone(&self) -> ButtonUpdate
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 ButtonUpdate
Source§impl Debug for ButtonUpdate
impl Debug for ButtonUpdate
impl Eq for ButtonUpdate
Source§impl PartialEq for ButtonUpdate
impl PartialEq for ButtonUpdate
Source§fn eq(&self, other: &ButtonUpdate) -> bool
fn eq(&self, other: &ButtonUpdate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ButtonUpdate
Auto Trait Implementations§
impl Freeze for ButtonUpdate
impl RefUnwindSafe for ButtonUpdate
impl Send for ButtonUpdate
impl Sync for ButtonUpdate
impl Unpin for ButtonUpdate
impl UnsafeUnpin for ButtonUpdate
impl UnwindSafe for ButtonUpdate
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