Trait IncMetric

Source
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).

Required Methods§

Source

fn add(&self, value: usize)

Adds value to the current counter.

Source

fn count(&self) -> usize

Returns current value of the counter.

Provided Methods§

Source

fn inc(&self)

Increments by 1 unit the current counter.

Implementors§