Struct ore::metrics::delete_on_drop::DeleteOnDropHistogram [−][src]
pub struct DeleteOnDropHistogram<'a, L> where
L: PromLabelsExt<'a>, {
inner: Histogram,
labels: L,
vec: HistogramVec,
_phantom: &'a PhantomData<()>,
}
This is supported on crate feature
metrics
only.Expand description
A GenericCounter
wrapper that deletes its labels from the vec when it is dropped
It adds a method to create a concrete metric from the vector that gets removed from the vector when the concrete metric is dropped.
Fields
inner: Histogram
labels: L
vec: HistogramVec
_phantom: &'a PhantomData<()>
Implementations
Methods from Deref<Target = Histogram>
Return a HistogramTimer
to track a duration.
Observe execution time of a closure, in second.
Return a LocalHistogram
for single thread usage.
Return accumulated sum of all samples.
Return count of all samples.
Trait Implementations
Auto Trait Implementations
impl<'a, L> !RefUnwindSafe for DeleteOnDropHistogram<'a, L>
impl<'a, L> Send for DeleteOnDropHistogram<'a, L> where
L: Send,
impl<'a, L> Sync for DeleteOnDropHistogram<'a, L> where
L: Sync,
impl<'a, L> Unpin for DeleteOnDropHistogram<'a, L> where
L: Unpin,
impl<'a, L> !UnwindSafe for DeleteOnDropHistogram<'a, L>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more