pub enum CandidateData {
Command {
name: String,
doc: String,
kind_label: String,
source: SourceLocation,
},
File {
path: PathBuf,
is_dir: bool,
size: Option<u64>,
},
Option {
name: String,
current_value: String,
doc: String,
},
OptionValue {
option_name: String,
value: String,
doc: String,
},
Chord {
chord: String,
mode_label: String,
doc: String,
},
Register {
name: char,
preview: String,
},
Mark {
name: char,
position: String,
},
Plain,
Extension {
kind_id: u32,
payload: Vec<u8>,
},
}Expand description
Generator-supplied metadata travelling alongside the candidate.
Annotators read this to produce display text without re-querying
the underlying registry. Plugin generators stash their own
payload in Extension (msgpack on the wire when WASM lands).
Variants§
Command
gen:commands payload: command’s full metadata at the time
of generation.
File
gen:files payload.
Option
gen:options payload (typed options post-§5.12).
Emitted for option-name completion (:set <Tab>). doc
is OptionDecl::DOC.
OptionValue
gen:options payload — value-completion mode.
Slice 3c.unify.option-doc-annotator. Emitted for
:set foo=<Tab> when the option’s OptionType::enumerate
returns Some. doc is EnumeratedValue::doc — per-value
help text the type chose to surface (empty when the type
hasn’t overridden enumerate_with_docs).
Chord
gen:chords payload.
Register
gen:registers payload.
Mark
gen:marks payload.
Plain
Generator that needs no extra metadata (text alone is enough).
Extension
Plugin-defined arbitrary payload. The pipeline preserves it
unchanged through matcher / ranker; annotators registered by
the same plugin recognise the kind_id and decode payload.
Trait Implementations§
Source§impl Clone for CandidateData
impl Clone for CandidateData
Source§fn clone(&self) -> CandidateData
fn clone(&self) -> CandidateData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more