pub trait Storage<K> {
    type Counter: CounterFn + Clone;
    type Gauge: GaugeFn + Clone;
    type Histogram: HistogramFn + Clone;

    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

The type used for counters.

The type used for gauges.

The type used for histograms.

Required Methods

Creates an empty counter.

Creates an empty gauge.

Creates an empty histogram.

Implementors