Trait mz_ore::metrics::delete_on_drop::MetricVecExt

source ·
pub trait MetricVecExt: MetricVec_ {
    // Required method
    fn get_delete_on_drop_metric<'a, L: PromLabelsExt<'a>>(
        &self,
        labels: L,
    ) -> DeleteOnDropMetric<'a, Self, L>;
}
Available on crate feature metrics only.
Expand description

Extension trait for metrics vectors.

It adds a method to create a concrete metric from the vector that gets removed from the vector when the concrete metric is dropped.

Required Methods§

source

fn get_delete_on_drop_metric<'a, L: PromLabelsExt<'a>>( &self, labels: L, ) -> DeleteOnDropMetric<'a, Self, L>

Returns a metric that deletes its labels from this metrics vector when dropped.

Object Safety§

This trait is not object safe.

Implementors§