Skip to main content

DeleteOnDropGauge

Type Alias DeleteOnDropGauge 

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

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

Aliased Type§

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

Fields§

§inner: <MetricVec<GaugeVecBuilder<P>> as MetricVec_>::M§cleanup: Arc<DeleteOnDropCleanup<MetricVec<GaugeVecBuilder<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<GenericGauge<P>> for DeleteOnDropGauge<P, L>
where P: Atomic, L: PromLabelsExt,

Source§

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

Immutably borrows from an owned value. Read more