pub struct MultiCounter { /* private fields */ }
Expand description
Represents a vector of named monotonic unsigned integer counters. Wrapper for IntCounterVec type
Implementations§
Source§impl MultiCounter
impl MultiCounter
Source§impl MultiCounter
impl MultiCounter
Sourcepub fn new(name: &str, description: &str, labels: &[&str]) -> Result<Self>
pub fn new(name: &str, description: &str, labels: &[&str]) -> Result<Self>
Creates a new vector of integer counters with given name, description and counter labels.
Sourcepub fn increment_by(&self, label_values: &[&str], by: u64)
pub fn increment_by(&self, label_values: &[&str], by: u64)
Increments counter with given labels by the given number.
Auto Trait Implementations§
impl Freeze for MultiCounter
impl !RefUnwindSafe for MultiCounter
impl Send for MultiCounter
impl Sync for MultiCounter
impl Unpin for MultiCounter
impl !UnwindSafe for MultiCounter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more