pub trait PromLabelsExt<'a> {
    fn get_from_metric_vec<P: MetricVecBuilder>(
        &self,
        vec: &MetricVec<P>
    ) -> <P as MetricVecBuilder>::M; fn remove_from_metric_vec<P: MetricVecBuilder>(
        &self,
        vec: &MetricVec<P>
    ) -> Result<(), Error>; }
Available on crate feature metrics only.
Expand description

An extension trait for types that are valid (or convertible into) prometheus labels: slices/vectors of strings, and HashMaps.

Required Methods

Returns or creates a metric with the given metric label values. Panics if retrieving the metric returns an error.

Removes a metric with these labels from a metrics vector.

Implementations on Foreign Types

Implementors