mz_ore::metrics::delete_on_drop

Trait 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§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

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§