Trait metrics_util::registry::Storage
source · pub trait Storage<K> {
type Counter: CounterFn + Clone;
type Gauge: GaugeFn + Clone;
type Histogram: HistogramFn + Clone;
// Required methods
fn counter(&self, key: &K) -> Self::Counter;
fn gauge(&self, key: &K) -> Self::Gauge;
fn histogram(&self, key: &K) -> Self::Histogram;
}
Expand description
Defines the underlying storage for metrics as well as how to create them.
Required Associated Types§
sourcetype Histogram: HistogramFn + Clone
type Histogram: HistogramFn + Clone
The type used for histograms.