Struct metrics_prometheus::Metric
source · pub struct Metric<M>(/* private fields */);
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
Trait Implementations§
source§impl CounterFn for Metric<IntCounter>
impl CounterFn for Metric<IntCounter>
source§impl HistogramFn for Metric<Histogram>
impl HistogramFn for Metric<Histogram>
impl<M: Copy> Copy for Metric<M>
Auto Trait Implementations§
impl<M> RefUnwindSafe for Metric<M>where
M: RefUnwindSafe,
impl<M> Send for Metric<M>where
M: Send,
impl<M> Sync for Metric<M>where
M: Sync,
impl<M> Unpin for Metric<M>where
M: Unpin,
impl<M> UnwindSafe for Metric<M>where
M: UnwindSafe,
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