pub trait Gauge: Default + Clear + Serialize {
fn incr_by(&self, count: usize);
fn decr_by(&self, count: usize);
fn incr(&self) { ... }
fn decr(&self) { ... }
}
Expand description
A trait for Gauges
Required Methods
Increment the gauge by count in one step
Supplying a count larger than the underlying counter’s remaining
capacity will wrap like u8::wrapping_add
and similar methods.
Decrement the gauge by count in one step
Supplying a count larger than the underlying counter’s current value
will wrap like u8::wrapping_sub
and similar methods.