pub enum CacheEntry<K, V, S = RandomState>{
Fifo(GenericCacheEntry<K, V, SanityEviction<Fifo<(K, V)>>, SanityIndexer<HashTableIndexer<K, FifoHandle<(K, V)>>>, S>),
Lru(GenericCacheEntry<K, V, SanityEviction<Lru<(K, V)>>, SanityIndexer<HashTableIndexer<K, LruHandle<(K, V)>>>, S>),
Lfu(GenericCacheEntry<K, V, SanityEviction<Lfu<(K, V)>>, SanityIndexer<HashTableIndexer<K, LfuHandle<(K, V)>>>, S>),
S3Fifo(GenericCacheEntry<K, V, SanityEviction<S3Fifo<(K, V)>>, SanityIndexer<HashTableIndexer<K, S3FifoHandle<(K, V)>>>, S>),
}Expand description
A cached entry holder of the in-memory cache.
Variants§
Fifo(GenericCacheEntry<K, V, SanityEviction<Fifo<(K, V)>>, SanityIndexer<HashTableIndexer<K, FifoHandle<(K, V)>>>, S>)
A cached entry holder of the in-memory FIFO cache.
Lru(GenericCacheEntry<K, V, SanityEviction<Lru<(K, V)>>, SanityIndexer<HashTableIndexer<K, LruHandle<(K, V)>>>, S>)
A cached entry holder of the in-memory LRU cache.
Lfu(GenericCacheEntry<K, V, SanityEviction<Lfu<(K, V)>>, SanityIndexer<HashTableIndexer<K, LfuHandle<(K, V)>>>, S>)
A cached entry holder of the in-memory LFU cache.
S3Fifo(GenericCacheEntry<K, V, SanityEviction<S3Fifo<(K, V)>>, SanityIndexer<HashTableIndexer<K, S3FifoHandle<(K, V)>>>, S>)
A cached entry holder of the in-memory S3FIFO cache.
Implementations§
source§impl<K, V, S> CacheEntry<K, V, S>
impl<K, V, S> CacheEntry<K, V, S>
sourcepub fn context(&self) -> CacheContext
pub fn context(&self) -> CacheContext
Context of the cached entry.
sourcepub fn is_outdated(&self) -> bool
pub fn is_outdated(&self) -> bool
If the cached entry is updated and outdated.
Trait Implementations§
source§impl<K, V, S> Clone for CacheEntry<K, V, S>
impl<K, V, S> Clone for CacheEntry<K, V, S>
source§impl<K, V, S> Debug for CacheEntry<K, V, S>
impl<K, V, S> Debug for CacheEntry<K, V, S>
Auto Trait Implementations§
impl<K, V, S> Freeze for CacheEntry<K, V, S>
impl<K, V, S = RandomState> !RefUnwindSafe for CacheEntry<K, V, S>
impl<K, V, S> Send for CacheEntry<K, V, S>
impl<K, V, S> Sync for CacheEntry<K, V, S>
impl<K, V, S> Unpin for CacheEntry<K, V, S>
impl<K, V, S = RandomState> !UnwindSafe for CacheEntry<K, V, S>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more