pub struct Buttons {
pub p: bool,
pub k: bool,
pub s: bool,
pub hs: bool,
pub fl: bool,
pub st: bool,
}Fields§
§p: bool§k: bool§s: bool§hs: bool§fl: bool§st: boolImplementations§
Source§impl Buttons
impl Buttons
pub const NONE: Buttons
pub fn one(b: Btn) -> Self
pub fn two(a: Btn, b: Btn) -> Self
pub fn chord(c: Chord) -> Self
pub fn get(self, b: Btn) -> bool
pub fn set(&mut self, b: Btn, v: bool)
pub fn any(self) -> bool
pub fn count(self) -> u8
pub fn iter(self) -> impl Iterator<Item = Btn>
pub fn has_chord(self, c: Chord) -> bool
pub fn just_pressed(self, prev: Self) -> Self
pub fn or(self, other: Self) -> Self
Trait Implementations§
impl Copy for Buttons
impl Eq for Buttons
impl StructuralPartialEq for Buttons
Auto Trait Implementations§
impl Freeze for Buttons
impl RefUnwindSafe for Buttons
impl Send for Buttons
impl Sync for Buttons
impl Unpin for Buttons
impl UnsafeUnpin for Buttons
impl UnwindSafe for Buttons
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