Trait captain_workflow_manager::JobUnit [−][src]
pub trait JobUnit: Debug + Any + Sized + Copy + Hash + Eq + Send {
fn deps(&self) -> Vec<Self>ⓘ;
fn cmd(&self) -> Option<String>;
fn out_file(&self) -> PathBuf;
fn log_file(&self) -> Option<PathBuf>;
fn name(&self) -> &'static str;
fn nice(&self) -> u16 { ... }
}
Expand description
A trait that must be implemented by struct representing job units.
A single struct is used to represent all the possible job units and their dependencies, so most of the checks are performed at run-time.
Required methods
Generate a vector containing all dependencies of the self
Returns the command to run to generate the output file of the job
If no command is specified (ie. this function returns None
),
the output file must be present on disk.