Skip to main content

CourierRunner

Trait CourierRunner 

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

Spawner seam for the courier process.

Unit tests substitute a fake so no test ever spends money or touches a real session; the live acceptance test uses ProcessCourierRunner.

Required Methods§

Source

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

Run one courier invocation to completion or to its timeout.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§