Skip to main content

DispatchingRule

Trait DispatchingRule 

Source
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

A dispatching rule that evaluates task priority.

§Score Convention

Lower score = higher priority. Rules should return smaller values for tasks that should be scheduled first.

§Reference

Pinedo (2016), “Scheduling”, Ch. 4: Priority Dispatching

Required Methods§

Source

fn name(&self) -> &'static str

Rule name (e.g., “SPT”, “EDD”).

Source

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§

Source

fn description(&self) -> &'static str

Rule description.

Implementors§