pub struct CommandRegistry { /* private fields */ }Implementations§
Source§impl CommandRegistry
impl CommandRegistry
pub fn new(builtins: &[&'static str], skills: Vec<LoadedSkill>) -> Self
pub fn new_with_plugins( builtins: &[&'static str], skills: Vec<LoadedSkill>, plugins: Vec<Plugin>, ) -> Self
Sourcepub fn rebuild_with(&self, skills: Vec<LoadedSkill>)
pub fn rebuild_with(&self, skills: Vec<LoadedSkill>)
Atomically replace the skill set. Built-ins are unchanged.
Sourcepub fn rebuild_with_plugins(
&self,
skills: Vec<LoadedSkill>,
plugins: Vec<Plugin>,
)
pub fn rebuild_with_plugins( &self, skills: Vec<LoadedSkill>, plugins: Vec<Plugin>, )
Atomically replace the skill and plugin-command set. Built-ins are unchanged.
pub fn resolve(&self, cmd: &str) -> Resolution
Sourcepub fn find_plugin_command_unqualified(
&self,
name: &str,
) -> Option<Arc<RegisteredPluginCommand>>
pub fn find_plugin_command_unqualified( &self, name: &str, ) -> Option<Arc<RegisteredPluginCommand>>
Look up a plugin command by its unqualified name. Returns the only match, or None if zero or multiple plugins claim the name. Used when a builtin command has the same identifier as a plugin-owned command that also has extension subcommands builtin and a plugin command name) and we need to bypass the builtin check to reach the plugin.
Sourcepub fn all_commands(&self) -> Vec<String>
pub fn all_commands(&self) -> Vec<String>
All commands for autocomplete/help: builtins + unique unqualified skill names, sorted.
Sourcepub fn lifecycle_for_command(&self, cmd: &str) -> Option<LifecycleClaim>
pub fn lifecycle_for_command(&self, cmd: &str) -> Option<LifecycleClaim>
Look up the lifecycle claim for a top-level command word, if any.
Phase 8 slice 8A. Returns the claim regardless of arg/subcommand —
callers (the dispatcher) decide what to do with toggle / status.
Sourcepub fn lifecycle_claims(&self) -> Vec<LifecycleClaim>
pub fn lifecycle_claims(&self) -> Vec<LifecycleClaim>
Snapshot of every claimed lifecycle command, in arbitrary order.
Used by /extensions to render the active claims and by the
pill renderer to enumerate sidecars.
Sourcepub fn lifecycle_claim_collisions(&self) -> Vec<(String, String, String)>
pub fn lifecycle_claim_collisions(&self) -> Vec<(String, String, String)>
Plugins that lost a lifecycle-claim collision during the most
recent rebuild. Each entry is (losing_plugin, command, winning_plugin). Surfaced in /extensions.
pub fn plugins(&self) -> Vec<PluginSummary>
pub fn plugin_help_entries(&self) -> Vec<HelpEntry>
Sourcepub fn plugin_settings_categories(&self) -> Vec<PluginSettingsCategory>
pub fn plugin_settings_categories(&self) -> Vec<PluginSettingsCategory>
Snapshot of every plugin-declared settings category, preserving plugin discovery order. The settings UI calls this on each open to merge plugin categories with the built-in ones.
pub fn all_skills(&self) -> Vec<Arc<LoadedSkill>>
Auto Trait Implementations§
impl !Freeze for CommandRegistry
impl RefUnwindSafe for CommandRegistry
impl Send for CommandRegistry
impl Sync for CommandRegistry
impl Unpin for CommandRegistry
impl UnsafeUnpin for CommandRegistry
impl UnwindSafe for CommandRegistry
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.