pub struct Metric {
pub metadata: MetricMetadata,
pub value: MetricValue,
}
Expand description
A complete metric entry, combining its value with its descriptive metadata.
Fields§
§metadata: MetricMetadata
The static, descriptive metadata for the metric.
value: MetricValue
The current, dynamic value of the metric.
Implementations§
Source§impl Metric
impl Metric
Sourcepub fn new_counter(
id: MetricId,
description: impl Into<String>,
initial_value: u64,
) -> Self
pub fn new_counter( id: MetricId, description: impl Into<String>, initial_value: u64, ) -> Self
A convenience constructor for creating a new Counter
metric.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnwindSafe for Metric
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