pub trait IncMetric {
// Required methods
fn add(&self, value: usize);
fn count(&self) -> usize;
// Provided method
fn inc(&self) { ... }
}
Expand description
Used for defining new types of metrics that act as a counter (i.e they are continuously updated by incrementing their value).