Type Alias substrate_prometheus_endpoint::SourcedGauge

source ·
pub type SourcedGauge<S> = SourcedMetric<Gauge, S>;
Expand description

A gauge whose values are obtained from an existing source.

Aliased Type§

struct SourcedGauge<S> { /* private fields */ }

Implementations

source§

impl<T: SourcedType, S: MetricSource> SourcedMetric<T, S>

source

pub fn new(opts: &Opts, source: S) -> Result<Self>

Creates a new metric that obtains its values from the given source.

Trait Implementations

source§

impl<T: Clone, S: Clone> Clone for SourcedMetric<T, S>

source§

fn clone(&self) -> SourcedMetric<T, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: SourcedType, S: MetricSource> Collector for SourcedMetric<T, S>

source§

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

Return descriptors for metrics.
source§

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

Collect metrics.
source§

impl<T: Debug, S: Debug> Debug for SourcedMetric<T, S>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more