Skip to main content

Job

Trait Job 

Source
pub trait Job {
    // Required methods
    fn id(&self) -> &str;
    fn design(&self) -> &str;
    fn attrs(&self) -> &Attrs;
    fn config(&self) -> &Path;
    fn work_dir(&self) -> &Path;
    fn steps(&self) -> &[Step];
    fn stop_after(&mut self, step: &str) -> Result<()>;
    fn write_result(
        &self,
        repo: &Repo,
        reports: &[StepReport],
        tools: &ToolEnv,
    ) -> Result<(Outcome, PathBuf)>;

    // Provided method
    fn note(&self) -> Option<String> { ... }
}
Expand description

One design in one flow, with one tool bound to each of the flow’s roles: what doris run runs and writes a result file for.

Required Methods§

Source

fn id(&self) -> &str

FLOW/DESIGN@TOOL.

Source

fn design(&self) -> &str

Source

fn attrs(&self) -> &Attrs

What filters match the job on.

Source

fn config(&self) -> &Path

The flow config file the job was planned from: the file whose resources its steps hold.

Source

fn work_dir(&self) -> &Path

The job’s directory, which holds its steps’ directories.

Source

fn steps(&self) -> &[Step]

Source

fn stop_after(&mut self, step: &str) -> Result<()>

Cut the job short: keep only step and the steps it depends on.

Source

fn write_result( &self, repo: &Repo, reports: &[StepReport], tools: &ToolEnv, ) -> Result<(Outcome, PathBuf)>

Write the job’s result file and return the job’s outcome, the worst of its steps, and where the file is. tools answers for the versions of the job’s tools.

Provided Methods§

Source

fn note(&self) -> Option<String>

What a person needs to run the job again as it ran, printed with its outcome, such as a seed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Job for doris::flows::crossing::Job

Source§

impl Job for doris::flows::lint::Job

Source§

impl Job for doris::flows::testrig::Job