pub fn group_by<'a>(
project: &'a Project,
schedule: &'a Schedule,
classifier: &dyn Classifier,
) -> Vec<(String, Vec<&'a Task>)>Expand description
Groups tasks by classifier categories.
Returns a vector of (category_label, tasks) tuples, sorted by the
classifier’s natural order. Empty categories are not included.
§Arguments
project- The project containing tasks to classifyschedule- The computed schedule (may be used by some classifiers)classifier- The classification scheme to apply
§Example
ⓘ
use utf8proj_core::{group_by, StatusClassifier};
let groups = group_by(&project, &schedule, &StatusClassifier);
for (category, tasks) in groups {
println!("{}: {} tasks", category, tasks.len());
}