Skip to main content

DeleteOnDropCounter

Type Alias DeleteOnDropCounter 

Source
pub type DeleteOnDropCounter<P, L> = DeleteOnDropMetric<GenericCounterVec<P>, L>;
Available on crate feature metrics only.
Expand description

A GenericCounter wrapper that deletes its labels from the vec when it is dropped.

Aliased Type§

pub struct DeleteOnDropCounter<P, L> {
    inner: <MetricVec<CounterVecBuilder<P>> as MetricVec_>::M,
    cleanup: Arc<DeleteOnDropCleanup<MetricVec<CounterVecBuilder<P>>, L>>,
}

Fields§

§inner: <MetricVec<CounterVecBuilder<P>> as MetricVec_>::M§cleanup: Arc<DeleteOnDropCleanup<MetricVec<CounterVecBuilder<P>>, L>>

Shared cleanup handle. The label is removed from vec only when the last clone drops. Held purely for its Drop side effect — never read directly.

Trait Implementations§

Source§

impl<P, L> Borrow<GenericCounter<P>> for DeleteOnDropCounter<P, L>
where P: Atomic, L: PromLabelsExt,

Source§

fn borrow(&self) -> &GenericCounter<P>

Immutably borrows from an owned value. Read more
Source§

impl<P, L> InstrumentedChannelMetric for DeleteOnDropCounter<P, L>
where P: Atomic, L: PromLabelsExt,

Available on crate feature async only.
Source§

fn bump(&self)

Bump the metric, increasing the count of operators (send or receives) that occurred.