logger_bro/task.rs
1/// ==============================================================================
2/// src/task.rs
3/// Task trait for workload-driven scientific objects.
4/// ==============================================================================
5
6/// A single unit of work executed by the runner.
7///
8/// Implement this on your scientific object. The launcher will call
9/// `workload_per_iter` for each tick and report progress using
10/// `total_iters`.
11pub trait Task: Send + 'static {
12 /// Human-readable label for the task.
13 fn label(&self) -> &str;
14
15 /// Total iterations for this task.
16 fn total_iters(&self) -> u64;
17
18 /// Perform one unit of work.
19 fn workload_per_iter(&mut self);
20}