Skip to main content

ProcessRunner

Trait ProcessRunner 

Source
pub trait ProcessRunner:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        program: &'life1 str,
        args: &'life2 [String],
        cwd: &'life3 Path,
    ) -> Pin<Box<dyn Future<Output = Result<ProcessOutput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Runs a local program under a strict allowlist.

A product that does not need to start external programs never instantiates this dependency — the contract is optional by construction.

Required Methods§

Source

fn run<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, program: &'life1 str, args: &'life2 [String], cwd: &'life3 Path, ) -> Pin<Box<dyn Future<Output = Result<ProcessOutput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

program must be in the configured allowlist. cwd is the working directory for the launched process.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§