Skip to main content

ExecutionBackend

Trait ExecutionBackend 

Source
pub trait ExecutionBackend: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn capabilities(&self) -> Capabilities;
    fn start<'life0, 'async_trait>(
        &'life0 self,
        req: RunRequest,
    ) -> Pin<Box<dyn Future<Output = Result<BackendHandle>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A pluggable execution backend. The boundary is the WHOLE build.

start spawns it and returns a BackendHandle. Per-step execution is a private concern of the backend (see the local backend’s internal StepRunner).

Required Methods§

Source

fn name(&self) -> &str

Stable id for diagnostics/telemetry (“local-docker”, “cloud”).

Source

fn capabilities(&self) -> Capabilities

What this backend can honor — consulted by the CLI before start.

Source

fn start<'life0, 'async_trait>( &'life0 self, req: RunRequest, ) -> Pin<Box<dyn Future<Output = Result<BackendHandle>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Begin running the whole build. Setup failures (auth, bad plan, no daemon) fail here; a failed build is Ok(handle) resolving to BuildOutcome { status: Failed }.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§