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§
Sourcefn metric_name(&self) -> &MetricName
fn metric_name(&self) -> &MetricName
Returns a name for this metric.
Sourcefn metric_value(&self) -> MetricValue
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".