Trait mz_ore::metrics::delete_on_drop::MetricVec_

source ·
pub trait MetricVec_: Sized {
    type M: Metric;

    // Required methods
    fn get_metric_with_label_values(
        &self,
        vals: &[&str],
    ) -> Result<Self::M, Error>;
    fn get_metric_with(
        &self,
        labels: &HashMap<&'_ str, &'_ str>,
    ) -> Result<Self::M, Error>;
    fn remove_label_values(&self, vals: &[&str]) -> Result<(), Error>;
    fn remove(&self, labels: &HashMap<&'_ str, &'_ str>) -> Result<(), Error>;
}
Available on crate feature metrics only.
Expand description

A trait that allows being generic over MetricVecs.

Required Associated Types§

source

type M: Metric

The associated Metric collected.

Required Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<P: MetricVecBuilder> MetricVec_ for MetricVec<P>

§

type M = <P as MetricVecBuilder>::M

source§

fn get_metric_with_label_values(&self, vals: &[&str]) -> Result<Self::M>

source§

fn get_metric_with( &self, labels: &HashMap<&'_ str, &'_ str>, ) -> Result<Self::M, Error>

source§

fn remove_label_values(&self, vals: &[&str]) -> Result<(), Error>

source§

fn remove(&self, labels: &HashMap<&'_ str, &'_ str>) -> Result<(), Error>

Implementors§