pub struct Metric {
pub name: &'static str,
pub help: &'static str,
pub kind: Kind,
pub read: fn(&Stats) -> u64,
}Expand description
One exported statistic.
Fields§
§name: &'static strMetric name, without any family prefix.
help: &'static strHelp text.
kind: KindGauge or counter.
read: fn(&Stats) -> u64Reads the value from a snapshot.
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 UnsafeUnpin 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