#[non_exhaustive]pub enum Warning {
Conflict {
chord: String,
contenders: Vec<String>,
winner: String,
},
UnknownAction {
key: String,
action: String,
},
PrefixShadow {
prefix: Vec<String>,
prefix_action: String,
shadowed: Vec<String>,
shadowed_action: String,
},
EmptySequence {
action: String,
},
SequenceShadow {
chord: String,
chord_action: String,
sequence: Vec<String>,
sequence_action: String,
},
}Expand description
A non-fatal problem found while building a Keymap.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Conflict
Two or more keys resolved to the same chord within one layer; the last one wins. A named layer’s conflict uses this same variant and carries no layer name, so two layers each conflicting on the same chord produce warnings indistinguishable on their own (the chord identifies the clash, not the layer). The same chord across different layers is an override, not a conflict, and is never reported.
Fields
UnknownAction
An action name in the config was not recognized by the resolver; the binding was skipped.
Fields
PrefixShadow
Two sequence bindings share a prefix: the shorter (prefix) is a proper
prefix of the longer (shadowed), so they cannot coexist without a
timeout to tell them apart. The later-in-file binding was dropped to keep
the sequence table prefix-free.
Fields
EmptySequence
A [[sequences]] entry had an empty keys array; it was skipped.
SequenceShadow
A single-chord [keys] binding collides with the first key of a
[[sequences]] entry (e.g. "j" in [keys] and a sequence ["j", "k"]).
Pressing that chord is then ambiguous — fire the single action now, or wait
to see if the sequence continues? — and can only be disambiguated by a
caller-side timeout (the vim jj case; see keymap-seq).
Unlike PrefixShadow, nothing is dropped: the
chord stays in its layer (the global one — this is checked only against the
global layer) and the sequence stays in BuildOutput::sequences (they are
separate maps). This is purely an
advisory that the caller composing the two maps must resolve the overlap.
Implementations§
Trait Implementations§
impl Eq for Warning
impl StructuralPartialEq for Warning
Auto Trait Implementations§
impl Freeze for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnsafeUnpin for Warning
impl UnwindSafe for Warning
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.