pub trait Counter: Default + Clear + Clearable + Serialize {
fn incr_by(&self, count: usize);
fn incr(&self) { ... }
}
Expand description
A trait for Counters
Required Methods
Increment the counter 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.