Skip to main content

ButtonMatrixEvents

Struct ButtonMatrixEvents 

Source
pub struct ButtonMatrixEvents<NAME, const ROWS: usize, const COLS: usize> { /* private fields */ }
Expand description

Events produced by one ButtonMatrix::scan call.

Implementations§

Source§

impl<NAME, const ROWS: usize, const COLS: usize> ButtonMatrixEvents<NAME, ROWS, COLS>
where NAME: Copy,

Source

pub const fn count(&self) -> usize

Returns the number of key events in this scan.

Source

pub const fn is_empty(&self) -> bool

Returns true if this scan produced no events.

Source

pub fn event_at( &self, row: usize, column: usize, ) -> Option<ButtonMatrixEvent<NAME>>

Returns the event at the given row and column, if that key changed in this scan.

Source

pub const fn iter(&self) -> ButtonMatrixEventIter<'_, NAME, ROWS, COLS> ⓘ

Iterates over all events in row-major order.

Trait Implementations§

Source§

impl<NAME: Clone, const ROWS: usize, const COLS: usize> Clone for ButtonMatrixEvents<NAME, ROWS, COLS>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<NAME: Copy, const ROWS: usize, const COLS: usize> Copy for ButtonMatrixEvents<NAME, ROWS, COLS>

Source§

impl<NAME: Debug, const ROWS: usize, const COLS: usize> Debug for ButtonMatrixEvents<NAME, ROWS, COLS>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<NAME: Eq, const ROWS: usize, const COLS: usize> Eq for ButtonMatrixEvents<NAME, ROWS, COLS>

Source§

impl<NAME: PartialEq, const ROWS: usize, const COLS: usize> PartialEq for ButtonMatrixEvents<NAME, ROWS, COLS>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<NAME: PartialEq, const ROWS: usize, const COLS: usize> StructuralPartialEq for ButtonMatrixEvents<NAME, ROWS, COLS>

Auto Trait Implementations§

§

impl<NAME, const ROWS: usize, const COLS: usize> Forget for ButtonMatrixEvents<NAME, ROWS, COLS>

§

impl<NAME, const ROWS: usize, const COLS: usize> Freeze for ButtonMatrixEvents<NAME, ROWS, COLS>
where [[NAME; COLS]; ROWS]: Freeze, [[Option<EventSlot>; COLS]; ROWS]: Freeze,

§

impl<NAME, const ROWS: usize, const COLS: usize> Move for ButtonMatrixEvents<NAME, ROWS, COLS>

§

impl<NAME, const ROWS: usize, const COLS: usize> RefUnwindSafe for ButtonMatrixEvents<NAME, ROWS, COLS>

§

impl<NAME, const ROWS: usize, const COLS: usize> Send for ButtonMatrixEvents<NAME, ROWS, COLS>
where [[NAME; COLS]; ROWS]: Send, [[Option<EventSlot>; COLS]; ROWS]: Send,

§

impl<NAME, const ROWS: usize, const COLS: usize> Sync for ButtonMatrixEvents<NAME, ROWS, COLS>
where [[NAME; COLS]; ROWS]: Sync, [[Option<EventSlot>; COLS]; ROWS]: Sync,

§

impl<NAME, const ROWS: usize, const COLS: usize> Unpin for ButtonMatrixEvents<NAME, ROWS, COLS>
where [[NAME; COLS]; ROWS]: Unpin, [[Option<EventSlot>; COLS]; ROWS]: Unpin,

§

impl<NAME, const ROWS: usize, const COLS: usize> UnsafeUnpin for ButtonMatrixEvents<NAME, ROWS, COLS>
where [[NAME; COLS]; ROWS]: UnsafeUnpin, [[Option<EventSlot>; COLS]; ROWS]: UnsafeUnpin,

§

impl<NAME, const ROWS: usize, const COLS: usize> UnwindSafe for ButtonMatrixEvents<NAME, ROWS, COLS>
where [[NAME; COLS]; ROWS]: UnwindSafe, [[Option<EventSlot>; COLS]; ROWS]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.