Skip to main content

Worker

Trait Worker 

Source
pub trait Worker {
    // Required methods
    fn describe(&self) -> Value;
    fn prepare(
        &self,
        spec: &mut JobSpec,
        base: &Path,
    ) -> Result<Box<dyn Prepared>>;
}
Expand description

The solver behind one worker ID. run turns it into a worker binary with the commands describe, validate and execute.

Required Methods§

Source

fn describe(&self) -> Value

The worker’s description for describe, usually built by description.

Source

fn prepare(&self, spec: &mut JobSpec, base: &Path) -> Result<Box<dyn Prepared>>

Validate all model data, bounds, starts, budgets and thread support. Resolve defaults into payload; no optimization is performed here.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§