pub trait DispatchingRule:
Send
+ Sync
+ Debug {
// Required methods
fn name(&self) -> &'static str;
fn evaluate(&self, task: &Task, context: &SchedulingContext) -> RuleScore;
// Provided method
fn description(&self) -> &'static str { ... }
}Expand description
Required Methods§
Sourcefn evaluate(&self, task: &Task, context: &SchedulingContext) -> RuleScore
fn evaluate(&self, task: &Task, context: &SchedulingContext) -> RuleScore
Evaluates the priority of a task given the current scheduling context.
Returns a score where lower = higher priority.
Provided Methods§
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Rule description.