Skip to main content

MetricVecBuilder

Trait MetricVecBuilder 

pub trait MetricVecBuilder:
    Send
    + Sync
    + Clone {
    type M: Metric;
    type P: Describer + Sync + Send + Clone;

    // Required method
    fn build<V>(&self, _: &Self::P, _: &[V]) -> Result<Self::M, Error>
       where V: AsRef<str>;
}
Expand description

An interface for building a metric vector.

Required Associated Types§

type M: Metric

The associated Metric collected.

type P: Describer + Sync + Send + Clone

The associated describer.

Required Methods§

fn build<V>(&self, _: &Self::P, _: &[V]) -> Result<Self::M, Error>
where V: AsRef<str>,

build builds a Metric with option and corresponding label names.

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.

Implementors§