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§

fn incr(&self, key: &str) -> Result<Counter, MetricError>

Increment the counter by 1

fn incr_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<'a, 'a, Counter>

Increment the counter by 1 and return a MetricBuilder that can be used to add tags to the metric.

fn decr(&self, key: &str) -> Result<Counter, MetricError>

Decrement the counter by 1

fn decr_with_tags<'a>(&'a self, key: &'a str) -> MetricBuilder<'a, 'a, Counter>

Decrement the counter by 1 and return a MetricBuilder that can be used to add tags to the metric.

Implementors§

§

impl CountedExt for StatsdClient