iroh_metrics

Trait Metric

Source
pub trait Metric: Debug {
    // Required methods
    fn type(&self) -> MetricType;
    fn value(&self) -> MetricValue;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Trait for metric items.

Required Methods§

Source

fn type(&self) -> MetricType

Returns the type of this metric.

Source

fn value(&self) -> MetricValue

Returns the current value of this metric.

Source

fn as_any(&self) -> &dyn Any

Casts this metric to Any for downcasting to concrete types.

Implementors§