Skip to main content

GateRunner

Trait GateRunner 

Source
pub trait GateRunner: Send + Sync {
    // Required method
    fn run<'a>(
        &'a self,
        def: &'a GateDefinition,
        workspace_root: &'a Path,
    ) -> Pin<Box<dyn Future<Output = GateResult> + Send + 'a>>;
}
Expand description

Abstraction over the mechanism used to actually execute a single gate.

Uses a BoxFuture return type to remain dyn-compatible without the async_trait crate.

Required Methods§

Source

fn run<'a>( &'a self, def: &'a GateDefinition, workspace_root: &'a Path, ) -> Pin<Box<dyn Future<Output = GateResult> + Send + 'a>>

Execute a single gate and return its result.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl GateRunner for SubprocessRunner

Source§

impl<F> GateRunner for MockRunner<F>
where F: Fn(&str) -> DagGateStatus + Send + Sync + 'static,