pub struct MetricLabel { /* private fields */ }
Expand description
A descriptor for a metric
It contains the metric name and the type (monotonic/non-monotonic) but does not contain a specific value
Implementations§
Source§impl MetricLabel
impl MetricLabel
Sourcepub fn new(name: &'static CStr, metric_type: MetricType) -> Self
pub fn new(name: &'static CStr, metric_type: MetricType) -> Self
Create a new metric label
Sourcepub fn with_value(&self, value: MetricValue) -> Metric
pub fn with_value(&self, value: MetricValue) -> Metric
Create a Metric
, assigning a specific value to a label
Trait Implementations§
Source§impl Clone for MetricLabel
impl Clone for MetricLabel
Source§fn clone(&self) -> MetricLabel
fn clone(&self) -> MetricLabel
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for MetricLabel
impl RefUnwindSafe for MetricLabel
impl Send for MetricLabel
impl Sync for MetricLabel
impl Unpin for MetricLabel
impl UnwindSafe for MetricLabel
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