pub struct GenerationalStorage<S> { /* private fields */ }
Available on crate features
registry
and recency
only.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<S: Debug> Debug for GenerationalStorage<S>
impl<S: Debug> Debug for GenerationalStorage<S>
source§impl<K, S: Storage<K>> Storage<K> for GenerationalStorage<S>
impl<K, S: Storage<K>> Storage<K> for GenerationalStorage<S>
Auto Trait Implementations§
impl<S> Freeze for GenerationalStorage<S>where
S: Freeze,
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