Skip to main content

DeleteOnDropHistogram

Type Alias DeleteOnDropHistogram 

Source
pub type DeleteOnDropHistogram<L> = DeleteOnDropMetric<HistogramVec, L>;
Available on crate feature metrics only.
Expand description

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

Aliased Type§

pub struct DeleteOnDropHistogram<L> {
    inner: Histogram,
    cleanup: Arc<DeleteOnDropCleanup<MetricVec<HistogramVecBuilder>, L>>,
}

Fields§

§inner: Histogram§cleanup: Arc<DeleteOnDropCleanup<MetricVec<HistogramVecBuilder>, 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<L> Borrow<Histogram> for DeleteOnDropHistogram<L>
where L: PromLabelsExt,

Source§

fn borrow(&self) -> &Histogram

Immutably borrows from an owned value. Read more