pub struct ButtonState {
pub a: bool,
pub b: bool,
pub c: bool,
}Expand description
Button state representation.
Fields§
§a: boolButton A pressed state
b: boolButton B pressed state
c: boolButton C pressed state
Implementations§
Source§impl ButtonState
impl ButtonState
Sourcepub fn any_pressed(&self) -> bool
pub fn any_pressed(&self) -> bool
Check if any button is pressed.
Sourcepub fn all_pressed(&self) -> bool
pub fn all_pressed(&self) -> bool
Check if all buttons are pressed.
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 Default for ButtonState
impl Default for ButtonState
Source§fn default() -> ButtonState
fn default() -> ButtonState
Returns the “default value” for a type. Read more
Source§impl Format for ButtonState
impl Format for ButtonState
Source§impl PartialEq for ButtonState
impl PartialEq 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