pub trait CommandDispatcher: Send + Sync {
// Required method
fn dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cmd: &'life1 Command,
ctx: &'life2 mut ExecContext,
) -> Pin<Box<dyn Future<Output = Result<ExecResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for dispatching a single command through the full resolution chain.
Implementations handle argument parsing, tool lookup, and execution. The pipeline runner handles I/O routing (stdin, redirects, piping).
Required Methods§
Sourcefn dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cmd: &'life1 Command,
ctx: &'life2 mut ExecContext,
) -> Pin<Box<dyn Future<Output = Result<ExecResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dispatch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cmd: &'life1 Command,
ctx: &'life2 mut ExecContext,
) -> Pin<Box<dyn Future<Output = Result<ExecResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dispatch a single command for execution.
The ctx provides stdin (from pipe or redirect), scope, and backend.
Implementations should handle schema-aware argument parsing and
output format extraction internally.