Enum ChordPattern
pub enum ChordPattern {
Literal(KeyChord),
CharLiteral,
}Expand description
One element of a keymap registration path.
Literal matches a specific chord; CharLiteral matches any
single bare-char chord (no modifiers). The wildcard captures
the matched char so the resulting [crate::ids::CommandId]
invocation can receive it (mark / register / find-char
targets all flow through this).
Lives in lattice-protocol alongside [KeyChord] because
mode crates (which contribute keymap bindings via
Mode::keymap()) need to construct paths without depending
on lattice-host. The matcher engine
(KeymapTrie / KeymapLayer / BoundCommand) stays in host:
it owns the lookup hot path, not the wire shape.
Variants§
Literal(KeyChord)
Matches exactly this chord.
CharLiteral
Matches any single unmodified character chord, capturing the char
(the {char} of m{char}, "{char}, f{char}).
Trait Implementations§
§impl Clone for ChordPattern
impl Clone for ChordPattern
§fn clone(&self) -> ChordPattern
fn clone(&self) -> ChordPattern
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ChordPattern
impl Debug for ChordPattern
impl Eq for ChordPattern
§impl Hash for ChordPattern
impl Hash for ChordPattern
§impl PartialEq for ChordPattern
impl PartialEq for ChordPattern
impl StructuralPartialEq for ChordPattern
Auto Trait Implementations§
impl Freeze for ChordPattern
impl RefUnwindSafe for ChordPattern
impl Send for ChordPattern
impl Sync for ChordPattern
impl Unpin for ChordPattern
impl UnsafeUnpin for ChordPattern
impl UnwindSafe for ChordPattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.