ShellProvider

Trait ShellProvider 

Source
pub trait ShellProvider: Send + Sync {
    // Required methods
    fn run_command<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        command: &'life1 str,
        cwd: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn run_with_env<'life0, 'life1, 'async_trait>(
        &'life0 self,
        command: &'life1 str,
        env: HashMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn run_background<'life0, 'life1, 'async_trait>(
        &'life0 self,
        command: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn kill_process<'life0, 'async_trait>(
        &'life0 self,
        pid: u32,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_environment<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_env_var<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        value: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn source_script<'life0, 'life1, 'async_trait>(
        &'life0 self,
        path: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Shell provider trait

Required Methods§

Source

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

Run a command and wait for result

Source

fn run_with_env<'life0, 'life1, 'async_trait>( &'life0 self, command: &'life1 str, env: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run a command with custom environment

Source

fn run_background<'life0, 'life1, 'async_trait>( &'life0 self, command: &'life1 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run a command in the background

Source

fn kill_process<'life0, 'async_trait>( &'life0 self, pid: u32, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Kill a background process

Source

fn get_environment<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get current shell environment

Source

fn set_env_var<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Set environment variable

Source

fn source_script<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source a shell script

Implementors§