pub struct BoundCommand {
pub command: CommandInvocation,
pub source: SourceLocation,
pub layer: KeymapLayer,
pub fall_through: bool,
}Expand description
What the trie returns at a terminal node.
Carries enough provenance for :describe-key and enough
information for the dispatcher to fire the binding:
command– the typedCommandInvocationto dispatch.source– where the binding was registered (catalog entry, userinit.rs:42, pluginfoo.wit:7).layer– priority tier for tie-break / shadowing.
Fields§
§command: CommandInvocationThe typed invocation the dispatcher runs when the chord resolves.
source: SourceLocationWhere the binding was registered, for :describe-key provenance.
layer: KeymapLayerThe layer the binding was created for. Set at construction by the
caller; KeymapHandle::bind sets it to
the layer it binds into.
fall_through: boolSN.3c.2b: :map-style augment-and-continue. When true, the
dispatcher runs this binding’s action AND THEN re-resolves the
same chord against the layers below this one (this binding’s
layer mode peeled out of the active set), running the native
binding too. false (default) = the binding fully handles the
chord and stops, the normal shadowing behavior. Unlike vim’s
:map recursion this is structurally bounded — each hop peels a
layer, terminating at Builtin, so it cannot loop. Declared on
the owning KeymapEntry; the host owns the re-resolution.
Implementations§
Source§impl BoundCommand
impl BoundCommand
Sourcepub fn from_invocation(
command: CommandInvocation,
source: SourceLocation,
layer: KeymapLayer,
) -> Self
pub fn from_invocation( command: CommandInvocation, source: SourceLocation, layer: KeymapLayer, ) -> Self
Construct a binding that dispatches via the
CommandInvocation. fall_through defaults to false (the
binding fully handles its chord); use Self::with_fall_through
to opt into augment-and-continue.
Sourcepub fn with_fall_through(self, fall_through: bool) -> Self
pub fn with_fall_through(self, fall_through: bool) -> Self
SN.3c.2b: set the augment-and-continue flag (see
BoundCommand::fall_through). Builder form so the many
existing from_invocation call sites stay source-compatible.
Trait Implementations§
Source§impl Clone for BoundCommand
impl Clone for BoundCommand
Source§fn clone(&self) -> BoundCommand
fn clone(&self) -> BoundCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more