Struct metrics_prometheus::Metric
source · pub struct Metric<M>(_);Expand description
Wrapper allowing implementing metrics::CounterFn, metrics::GaugeFn
and metrics::HistogramFn for prometheus metrics.
Implementations§
source§impl<M> Metric<M>
impl<M> Metric<M>
sourcepub const fn wrap(metric: M) -> Self
pub const fn wrap(metric: M) -> Self
Wraps the provided prometheus metric.
sourcepub fn into_inner(self) -> M
pub fn into_inner(self) -> M
Unwraps this Metric returning its inner prometheus metric