Classifier

Trait Classifier 

Source
pub trait Classifier: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn classify(&self, task: &Task, schedule: &Schedule) -> (String, usize);
}
Expand description

Classifiers discretize continuous task attributes into categorical labels.

This abstraction enables multiple view patterns (Kanban, risk matrix, budget tracking) through a single interface. Classifiers are read-only - they observe state but never mutate it.

§Example

use utf8proj_core::{Classifier, StatusClassifier, Task, Schedule};

let classifier = StatusClassifier;
assert_eq!(classifier.name(), "Progress Status");

Required Methods§

Source

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

Human-readable name for this classification scheme

Source

fn classify(&self, task: &Task, schedule: &Schedule) -> (String, usize)

Classify a task into a category with ordering.

Returns (label, order) where:

  • label: The category name (e.g., “Doing”, “Critical”)
  • order: Sort position (lower = earlier in output)

Implementors§