Skip to main content

ProcessSpawner

Trait ProcessSpawner 

Source
pub trait ProcessSpawner: Send + Sync {
    // Required method
    fn spawn<'life0, 'async_trait>(
        &'life0 self,
        command: String,
        args: Vec<String>,
        cwd: Option<String>,
    ) -> Pin<Box<dyn Future<Output = Result<SpawnResult, SpawnError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for spawning processes (local or remote)

This abstraction allows plugins and core features (like file discovery) to spawn processes transparently on either local or remote filesystems.

Required Methods§

Source

fn spawn<'life0, 'async_trait>( &'life0 self, command: String, args: Vec<String>, cwd: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<SpawnResult, SpawnError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Spawn a process and wait for completion

Implementors§