pub struct ButtonEvents {
pub pressed: bool,
pub released: bool,
pub click: bool,
pub double_click: bool,
pub hold: bool,
}Expand description
Events produced by one Button::update call.
Fields§
§pressed: boolThe stable state changed to pressed.
released: boolThe stable state changed to released.
click: boolA short single click was confirmed.
double_click: boolTwo short clicks completed inside the configured interval.
hold: boolThe button reached the configured hold threshold.
Implementations§
Trait Implementations§
Source§impl Clone for ButtonEvents
impl Clone for ButtonEvents
Source§fn clone(&self) -> ButtonEvents
fn clone(&self) -> ButtonEvents
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 ButtonEvents
Source§impl Debug for ButtonEvents
impl Debug for ButtonEvents
Source§impl Default for ButtonEvents
impl Default for ButtonEvents
Source§fn default() -> ButtonEvents
fn default() -> ButtonEvents
Returns the “default value” for a type. Read more
impl Eq for ButtonEvents
Source§impl PartialEq for ButtonEvents
impl PartialEq for ButtonEvents
Source§fn eq(&self, other: &ButtonEvents) -> bool
fn eq(&self, other: &ButtonEvents) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ButtonEvents
Auto Trait Implementations§
impl Freeze for ButtonEvents
impl RefUnwindSafe for ButtonEvents
impl Send for ButtonEvents
impl Sync for ButtonEvents
impl Unpin for ButtonEvents
impl UnsafeUnpin for ButtonEvents
impl UnwindSafe for ButtonEvents
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