1use std::fmt::Display;
2
3use crate::summary::RunSummary;
4
5pub trait StatusReporter: Send + Sync {
6 fn phase(&self, name: &str);
7 fn step(&self, msg: &str);
8 fn counter(&self, key: &str, value: u64);
9 fn info(&self, key: &str, value: &dyn Display);
10 fn warn(&self, msg: &str);
11 fn summary(&self, summary: &RunSummary);
12 fn done(&self, name: &str);
13}
14
15pub struct NullReporter;
16
17impl StatusReporter for NullReporter {
18 fn phase(&self, _: &str) {}
19 fn step(&self, _: &str) {}
20 fn counter(&self, _: &str, _: u64) {}
21 fn info(&self, _: &str, _: &dyn Display) {}
22 fn warn(&self, _: &str) {}
23 fn summary(&self, _: &RunSummary) {}
24 fn done(&self, _: &str) {}
25}