Skip to main content

Collector

Trait Collector 

Source
pub trait Collector: Sync + Send {
    // Required methods
    fn desc(&self) -> Vec<&Desc>;
    fn collect(&self) -> Vec<MetricFamily>;
}
Expand description

An interface for collecting metrics.

Required Methods§

Source

fn desc(&self) -> Vec<&Desc>

Return descriptors for metrics.

Source

fn collect(&self) -> Vec<MetricFamily>

Collect metrics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§