pub struct Counter { /* private fields */ }Expand description
High-performance counter metric
Implementations§
Source§impl Counter
impl Counter
Sourcepub fn with_labels(name: String, labels: HashMap<String, String>) -> Self
pub fn with_labels(name: String, labels: HashMap<String, String>) -> Self
Create a counter with labels
Sourcepub fn to_metric_point(&self) -> MetricPoint
pub fn to_metric_point(&self) -> MetricPoint
Get metric point
Trait Implementations§
Source§impl MetricProvider for Counter
impl MetricProvider for Counter
Source§fn get_metric_points(&self) -> Vec<MetricPoint>
fn get_metric_points(&self) -> Vec<MetricPoint>
Get all metric points from this provider
Auto Trait Implementations§
impl !Freeze for Counter
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more