pub trait Counter: Send + Sync {
// Required methods
fn clear(&self);
fn inc(&self);
fn add(&self, value: usize);
fn snapshot(&self) -> CounterSnapshot;
}Expand description
Counter is a Metric that represents a single numerical value that can
increases over time.
Required Methods§
Sourcefn snapshot(&self) -> CounterSnapshot
fn snapshot(&self) -> CounterSnapshot
Take a snapshot of the current value for use with a Reporter.