pub struct CommandsGenerator;Expand description
gen:commands. Walks the CommandRegistry and emits one
RawCandidate per registered CommandSpec. Filtering is
deferred to the matcher; the generator returns the full set
every time the cache misses.
Delimiter-form commands (ex:substitute, ex:global –
SurfaceForm::Delimiter) are excluded: the user types those
via :s/.../.../, :g/.../.../, :v/.../.../. Surfacing them
as completion candidates is misleading because typing
:ex:global would error with “use the delimiter form” – the
keyword form is intentionally a hard-error redirect (DESIGN.md
§B.2). They remain reachable through :describe-command /
:apropos for introspection.
Trait Implementations§
Source§impl CandidateGenerator for CommandsGenerator
impl CandidateGenerator for CommandsGenerator
fn generate(&self, ctx: &GenerateContext<'_>) -> Vec<RawCandidate>
Source§fn cache_key(&self, ctx: &GenerateContext<'_>) -> Option<CacheKey>
fn cache_key(&self, ctx: &GenerateContext<'_>) -> Option<CacheKey>
Optional cache key. When two contexts produce the same
Some(key), the pipeline serves the second from cache. The
query (prefix) is implicitly part of the key only if the
generator includes it – many generators key on a registry
version (cache covers all queries until the registry
changes) and let the matcher do the per-query filtering.Auto Trait Implementations§
impl Freeze for CommandsGenerator
impl RefUnwindSafe for CommandsGenerator
impl Send for CommandsGenerator
impl Sync for CommandsGenerator
impl Unpin for CommandsGenerator
impl UnsafeUnpin for CommandsGenerator
impl UnwindSafe for CommandsGenerator
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
Mutably borrows from an owned value. Read more