Trait CountedExt
pub trait CountedExt: Counted<i64> {
// Provided methods
fn incr(&self, key: &str) -> Result<Counter, MetricError> { ... }
fn incr_with_tags<'a>(
&'a self,
key: &'a str,
) -> MetricBuilder<'a, 'a, Counter> { ... }
fn decr(&self, key: &str) -> Result<Counter, MetricError> { ... }
fn decr_with_tags<'a>(
&'a self,
key: &'a str,
) -> MetricBuilder<'a, 'a, Counter> { ... }
}
Expand description
Trait for convenience methods for counters
This trait specifically implements increment and decrement convenience
methods for counters with i64
types.
Provided Methods§
Increment the counter by 1 and return a MetricBuilder
that can
be used to add tags to the metric.
Decrement the counter by 1 and return a MetricBuilder
that can
be used to add tags to the metric.