pub trait Writer {
// Required method
fn end(&self, data: &Vec<BenchData>);
}
Expand description
The trait that is implemented by all the writers
§Examples
QueueLogger will log out to console all the collected data when program ends.
struct QueueLogger;
impl Writer for QueueLogger {
fn end(&self, data: &Vec<BenchData>) {
for data in data.iter() {
println!("{:#?}", data);
}
}
}