pub trait CommandRegistry {
// Provided methods
fn get_commands(&self) -> Vec<CommandSpec> { ... }
async fn dispatch_commands(
&self,
_server: &Server,
_event: &mut EventContext<'_, CommandEvent>,
) -> bool { ... }
}Expand description
Trait plugins use to expose commands to the host.
Provided Methods§
fn get_commands(&self) -> Vec<CommandSpec>
Sourceasync fn dispatch_commands(
&self,
_server: &Server,
_event: &mut EventContext<'_, CommandEvent>,
) -> bool
async fn dispatch_commands( &self, _server: &Server, _event: &mut EventContext<'_, CommandEvent>, ) -> bool
Dispatch to registered commands. Returns true if a command was handled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.