pub trait Job: Send {
type Exclusion: PartialEq + Copy + Debug + Send;
type Priority: Ord + Copy + Send;
// Required methods
fn exclusion(&self) -> Self::Exclusion;
fn priority(&self) -> Self::Priority;
fn execute(self);
}
Expand description
A job which can be executed by the runner, with features to synchronise jobs that would interfere with each other and reduce the parallelisation of low priority jobs
Required Associated Types§
Sourcetype Exclusion: PartialEq + Copy + Debug + Send
type Exclusion: PartialEq + Copy + Debug + Send
Type used to check which jobs should not be allowed to run concurrently, see Job::exclusion()
. Use NoExclusion
for jobs which can always be run at the same time, see also ExclusionOption
.