Skip to main content

CommandRunner

Trait CommandRunner 

Source
pub trait CommandRunner: Send + Sync {
    // Required method
    fn run_command<'life0, 'async_trait>(
        &'life0 self,
        request: CommandRequest,
        ctx: ToolExecutionContext,
    ) -> Pin<Box<dyn Future<Output = CommandResponse> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn is_available(&self) -> bool { ... }
}
Expand description

Host bridge for controlled command execution.

Required Methods§

Source

fn run_command<'life0, 'async_trait>( &'life0 self, request: CommandRequest, ctx: ToolExecutionContext, ) -> Pin<Box<dyn Future<Output = CommandResponse> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Run a command request and return bounded output evidence.

Provided Methods§

Source

fn is_available(&self) -> bool

Return whether this runner can execute commands now.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§