Skip to main content

CommandExecutor

Trait CommandExecutor 

Source
pub trait CommandExecutor: Send + Sync {
    // Required method
    fn execute<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        command: &'life1 str,
        cwd: &'life2 Path,
    ) -> Pin<Box<dyn Future<Output = Result<ShellOutput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for command execution strategies

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, command: &'life1 str, cwd: &'life2 Path, ) -> Pin<Box<dyn Future<Output = Result<ShellOutput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Execute a command in the given directory

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§