ckb_metrics::core

Trait MetricVecBuilder

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

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

An interface for building a metric vector.

Required Associated Types§

Source

type M: Metric

The associated Metric collected.

Source

type P: Describer + Sync + Send + Clone

The associated describer.

Required Methods§

Source

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

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§