Struct ore::metrics::DeleteOnDropCounter [−][src]
pub struct DeleteOnDropCounter<'a, P, L> where
P: Atomic,
L: PromLabelsExt<'a>, {
inner: GenericCounter<P>,
labels: L,
vec: GenericCounterVec<P>,
_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: GenericCounter<P>
labels: L
vec: GenericCounterVec<P>
_phantom: &'a PhantomData<()>
Implementations
Methods from Deref<Target = GenericCounter<P>>
The fully qualified name for this counter
This is the name with no labels, and corresponds to desc().fq_name
on
the Collector
trait.
Return a GenericLocalCounter
for single thread usage.
Trait Implementations
impl<'a, P: Debug, L: Debug> Debug for DeleteOnDropCounter<'a, P, L> where
P: Atomic,
L: PromLabelsExt<'a>,
impl<'a, P: Debug, L: Debug> Debug for DeleteOnDropCounter<'a, P, L> where
P: Atomic,
L: PromLabelsExt<'a>,
type Target = GenericCounter<P>
type Target = GenericCounter<P>
The resulting type after dereferencing.
Dereferences the value.
Auto Trait Implementations
impl<'a, P, L> !RefUnwindSafe for DeleteOnDropCounter<'a, P, L>
impl<'a, P, L> Send for DeleteOnDropCounter<'a, P, L> where
L: Send,
impl<'a, P, L> Sync for DeleteOnDropCounter<'a, P, L> where
L: Sync,
impl<'a, P, L> Unpin for DeleteOnDropCounter<'a, P, L> where
L: Unpin,
impl<'a, P, L> !UnwindSafe for DeleteOnDropCounter<'a, P, 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