pub trait Metric: Send + Sync + 'static {
// Required methods
fn as_any(&self) -> Option<&(dyn Any + 'static)>;
fn value(&self) -> Option<Value<'_>>;
// Provided method
fn is_enabled(&self) -> bool { ... }
}
Expand description
Global interface to a metric.
Most use of metrics should use the directly declared constants.
Required Methods§
Provided Methods§
sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Indicate whether this metric has been set up.
Generally, if this returns false
then the other methods on this
trait should return None
.