pub trait Introspectable {
// Required methods
fn kind_label(&self) -> &'static str;
fn identifier(&self) -> String;
fn doc(&self) -> &str;
fn sources(&self) -> Vec<SourceEntry<'_>>;
// Provided method
fn extra_sections(&self) -> Vec<HelpSection> { ... }
}Expand description
A registered / bound / set thing, queryable from :describe-*.
Required Methods§
Sourcefn kind_label(&self) -> &'static str
fn kind_label(&self) -> &'static str
Kind label for the help-buffer heading: "command", "key",
"option", "event", "mode", "buffer".
Sourcefn identifier(&self) -> String
fn identifier(&self) -> String
User-facing identifier: "ex:write", "j",
"editor.line-numbers".
Sourcefn doc(&self) -> &str
fn doc(&self) -> &str
Multi-line documentation. May be empty (the renderer prints a
(no documentation) placeholder).
Sourcefn sources(&self) -> Vec<SourceEntry<'_>>
fn sources(&self) -> Vec<SourceEntry<'_>>
One or more provenance entries. Empty means “no recorded origin” (common for synthesised buffers / runtime values without a trace).
Provided Methods§
Sourcefn extra_sections(&self) -> Vec<HelpSection>
fn extra_sections(&self) -> Vec<HelpSection>
Type-specific blocks: args list for commands, mode-grouped bindings for keys, value/type for options, payload for events, keymap chain for modes. Default empty.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".