mz_ore::metrics

Trait MakeCollector

Source
pub trait MakeCollector:
    Collector
    + Clone
    + 'static {
    // Required method
    fn make_collector(opts: MakeCollectorOpts) -> Self;
}
Available on crate feature metrics only.
Expand description

A wrapper for creating prometheus metrics more conveniently.

Together with the metric macro, this trait is mainly used by MetricsRegistry and should not normally be used outside the metric registration flow.

Required Methods§

Source

fn make_collector(opts: MakeCollectorOpts) -> Self

Creates a new collector.

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<T> MakeCollector for GenericCounter<T>
where T: Atomic + 'static,

Source§

impl<T> MakeCollector for GenericGauge<T>
where T: Atomic + 'static,

Source§

impl<T> MakeCollector for GenericCounterVec<T>
where T: Atomic + 'static,

Source§

impl<T> MakeCollector for GenericGaugeVec<T>
where T: Atomic + 'static,

Implementors§