pub struct ChordIndices<const MAX_CHORD_SIZE: usize> { /* private fields */ }
Expand description
Chords are defined by an (unordered) set of keymap indices into the keymap.
Implementations§
Source§impl<const MAX_CHORD_SIZE: usize> ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> ChordIndices<MAX_CHORD_SIZE>
Sourcepub const fn from_slice(indices: &[u16]) -> ChordIndices<MAX_CHORD_SIZE>
pub const fn from_slice(indices: &[u16]) -> ChordIndices<MAX_CHORD_SIZE>
Constructs a new ChordIndices value from the given slice.
The given slice must be less than MAX_CHORD_SIZE
in length.
Sourcepub fn is_satisfied_by(&self, indices: &[u16]) -> bool
pub fn is_satisfied_by(&self, indices: &[u16]) -> bool
Whether the chord is satisfied by the given indices.
Trait Implementations§
Source§impl<const MAX_CHORD_SIZE: usize> Clone for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> Clone for ChordIndices<MAX_CHORD_SIZE>
Source§fn clone(&self) -> ChordIndices<MAX_CHORD_SIZE>
fn clone(&self) -> ChordIndices<MAX_CHORD_SIZE>
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<const MAX_CHORD_SIZE: usize> Debug for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> Debug for ChordIndices<MAX_CHORD_SIZE>
Source§impl<'de, const MAX_CHORD_SIZE: usize> Deserialize<'de> for ChordIndices<MAX_CHORD_SIZE>
impl<'de, const MAX_CHORD_SIZE: usize> Deserialize<'de> for ChordIndices<MAX_CHORD_SIZE>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const MAX_CHORD_SIZE: usize> From<Vec<u16, MAX_CHORD_SIZE>> for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> From<Vec<u16, MAX_CHORD_SIZE>> for ChordIndices<MAX_CHORD_SIZE>
Source§impl<const MAX_CHORD_SIZE: usize> PartialEq for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> PartialEq for ChordIndices<MAX_CHORD_SIZE>
Source§fn eq(&self, other: &ChordIndices<MAX_CHORD_SIZE>) -> bool
fn eq(&self, other: &ChordIndices<MAX_CHORD_SIZE>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<const MAX_CHORD_SIZE: usize> Copy for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> StructuralPartialEq for ChordIndices<MAX_CHORD_SIZE>
Auto Trait Implementations§
impl<const MAX_CHORD_SIZE: usize> Freeze for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> RefUnwindSafe for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> Send for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> Sync for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> Unpin for ChordIndices<MAX_CHORD_SIZE>
impl<const MAX_CHORD_SIZE: usize> UnwindSafe for ChordIndices<MAX_CHORD_SIZE>
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