Struct metrics_util::registry::GenerationalStorage
source · pub struct GenerationalStorage<S> { /* private fields */ }
Expand description
Generational metric storage.
Tracks the “generation” of a metric, which is used to detect updates to metrics where the value otherwise would not be sufficient to be used as an indicator.
Implementations§
source§impl<S> GenerationalStorage<S>
impl<S> GenerationalStorage<S>
sourcepub fn new(storage: S) -> Self
pub fn new(storage: S) -> Self
Creates a new GenerationalStorage
.
This wraps the given storage
and provides generational semantics on top of it.
source§impl GenerationalStorage<AtomicStorage>
impl GenerationalStorage<AtomicStorage>
sourcepub fn atomic() -> Self
pub fn atomic() -> Self
Creates a GenerationalStorage
that uses AtomicStorage
as its underlying storage.
Trait Implementations§
source§impl<K, S: Storage<K>> Storage<K> for GenerationalStorage<S>
impl<K, S: Storage<K>> Storage<K> for GenerationalStorage<S>
§type Counter = Generational<<S as Storage<K>>::Counter>
type Counter = Generational<<S as Storage<K>>::Counter>
The type used for counters.
§type Gauge = Generational<<S as Storage<K>>::Gauge>
type Gauge = Generational<<S as Storage<K>>::Gauge>
The type used for gauges.
§type Histogram = Generational<<S as Storage<K>>::Histogram>
type Histogram = Generational<<S as Storage<K>>::Histogram>
The type used for histograms.
Auto Trait Implementations§
impl<S> RefUnwindSafe for GenerationalStorage<S>where S: RefUnwindSafe,
impl<S> Send for GenerationalStorage<S>where S: Send,
impl<S> Sync for GenerationalStorage<S>where S: Sync,
impl<S> Unpin for GenerationalStorage<S>where S: Unpin,
impl<S> UnwindSafe for GenerationalStorage<S>where S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more