pub trait OperatorChordWirer: Send + Sync {
// Required method
fn wire(
&self,
op: OperatorId,
chord: &str,
doubled: Option<char>,
mode: ModeId,
plugin_id: u32,
plugin_name: &str,
post_motion_char: bool,
) -> Result<(), String>;
}Expand description
Wires a plugin operator’s chord into the universal operator-pending layer.
Required Methods§
Sourcefn wire(
&self,
op: OperatorId,
chord: &str,
doubled: Option<char>,
mode: ModeId,
plugin_id: u32,
plugin_name: &str,
post_motion_char: bool,
) -> Result<(), String>
fn wire( &self, op: OperatorId, chord: &str, doubled: Option<char>, mode: ModeId, plugin_id: u32, plugin_name: &str, post_motion_char: bool, ) -> Result<(), String>
Bind chord to op, with the full operator-pending surface.
doubled is the TRAILING key of the linewise form (c for gcc),
not the whole chord; None binds no doubled form.
mode scopes the bindings to that minor mode’s keymap layer rather
than Builtin. A plugin’s chord must not outlive the plugin: bound at
Builtin, gc would survive :set comment.enabled=false pointing at
a handler that is gone.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".