#[non_exhaustive]#[repr(u32)]pub enum ButtonState {
Released = 0,
Pressed = 1,
}
Expand description
physical button state
Describes the physical state of a button that produced the button event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Released = 0
the button is not pressed
Since version 1.
Pressed = 1
the button is pressed
Since version 1.
Trait Implementations§
Source§impl Clone for ButtonState
impl Clone for ButtonState
Source§fn clone(&self) -> ButtonState
fn clone(&self) -> ButtonState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ButtonState
impl Debug for ButtonState
Source§impl From<ButtonState> for u32
impl From<ButtonState> for u32
Source§fn from(val: ButtonState) -> u32
fn from(val: ButtonState) -> u32
Converts to this type from the input type.
Source§impl Hash for ButtonState
impl Hash for ButtonState
Source§impl PartialEq for ButtonState
impl PartialEq for ButtonState
Source§impl TryFrom<u32> for ButtonState
impl TryFrom<u32> for ButtonState
impl Copy for ButtonState
impl Eq for ButtonState
impl StructuralPartialEq for ButtonState
Auto Trait Implementations§
impl Freeze for ButtonState
impl RefUnwindSafe for ButtonState
impl Send for ButtonState
impl Sync for ButtonState
impl Unpin for ButtonState
impl UnwindSafe for ButtonState
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