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,
) -> BoundCommand
pub fn from_invocation( command: CommandInvocation, source: SourceLocation, layer: KeymapLayer, ) -> BoundCommand
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) -> BoundCommand
pub fn with_fall_through(self, fall_through: bool) -> BoundCommand
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 moreAuto Trait Implementations§
impl Freeze for BoundCommand
impl RefUnwindSafe for BoundCommand
impl Send for BoundCommand
impl Sync for BoundCommand
impl Unpin for BoundCommand
impl UnsafeUnpin for BoundCommand
impl UnwindSafe for BoundCommand
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more