pub trait BwCommandExt: BwCommand {
// Required method
async fn dispatch(self, ctx: ClientContext) -> Result<CommandOutput>;
}Expand description
Extension trait that wires BwCommand up to the ClientContext dispatcher.
Implemented for every BwCommand via a blanket impl, so commands only need to define
run; dispatch is provided automatically and cannot be overridden.
§Example
ⓘ
// In `process_commands`:
Commands::Sync(args) => args.dispatch(ctx).await,Required Methods§
async fn dispatch(self, ctx: ClientContext) -> Result<CommandOutput>
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.