Skip to main content

Metric

Trait Metric 

Source
pub trait Metric {
    // Required methods
    fn metric_name(&self) -> &MetricName;
    fn metric_value(&self) -> MetricValue;
}
Expand description

A metric tracked for monitoring purposes.

Required Methods§

Source

fn metric_name(&self) -> &MetricName

Returns a name for this metric.

Source

fn metric_value(&self) -> MetricValue

Returns the value of the metric, which may be measurable or a non-measurable gauge.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§