pub enum CacheEntry<K, V, S = BuildHasherDefault<AHasher>, P = CacheProperties>{
Fifo(RawCacheEntry<Fifo<K, V, P>, S>),
S3Fifo(RawCacheEntry<S3Fifo<K, V, P>, S>),
Lru(RawCacheEntry<Lru<K, V, P>, S>),
Lfu(RawCacheEntry<Lfu<K, V, P>, S>),
}
Expand description
A cached entry holder of the in-memory cache.
Variants§
Fifo(RawCacheEntry<Fifo<K, V, P>, S>)
A cached entry holder of the in-memory FIFO cache.
S3Fifo(RawCacheEntry<S3Fifo<K, V, P>, S>)
A cached entry holder of the in-memory S3FIFO cache.
Lru(RawCacheEntry<Lru<K, V, P>, S>)
A cached entry holder of the in-memory LRU cache.
Lfu(RawCacheEntry<Lfu<K, V, P>, S>)
A cached entry holder of the in-memory LFU cache.
Implementations§
Source§impl<K, V, S, P> CacheEntry<K, V, S, P>
impl<K, V, S, P> CacheEntry<K, V, S, P>
Sourcepub fn properties(&self) -> &P
pub fn properties(&self) -> &P
Properties 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, P> Clone for CacheEntry<K, V, S, P>
impl<K, V, S, P> Clone for CacheEntry<K, V, S, P>
Source§fn clone(&self) -> CacheEntry<K, V, S, P>
fn clone(&self) -> CacheEntry<K, V, S, P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<K, V, S, P> Debug for CacheEntry<K, V, S, P>
impl<K, V, S, P> Debug for CacheEntry<K, V, S, P>
Source§impl<K, V, S, P> Deref for CacheEntry<K, V, S, P>
impl<K, V, S, P> Deref for CacheEntry<K, V, S, P>
Source§impl<K, V, S, P> From<RawCacheEntry<Fifo<K, V, P>, S>> for CacheEntry<K, V, S, P>
impl<K, V, S, P> From<RawCacheEntry<Fifo<K, V, P>, S>> for CacheEntry<K, V, S, P>
Source§fn from(entry: RawCacheEntry<Fifo<K, V, P>, S>) -> CacheEntry<K, V, S, P>
fn from(entry: RawCacheEntry<Fifo<K, V, P>, S>) -> CacheEntry<K, V, S, P>
Converts to this type from the input type.
Source§impl<K, V, S, P> From<RawCacheEntry<Lfu<K, V, P>, S>> for CacheEntry<K, V, S, P>
impl<K, V, S, P> From<RawCacheEntry<Lfu<K, V, P>, S>> for CacheEntry<K, V, S, P>
Source§fn from(entry: RawCacheEntry<Lfu<K, V, P>, S>) -> CacheEntry<K, V, S, P>
fn from(entry: RawCacheEntry<Lfu<K, V, P>, S>) -> CacheEntry<K, V, S, P>
Converts to this type from the input type.
Source§impl<K, V, S, P> From<RawCacheEntry<Lru<K, V, P>, S>> for CacheEntry<K, V, S, P>
impl<K, V, S, P> From<RawCacheEntry<Lru<K, V, P>, S>> for CacheEntry<K, V, S, P>
Source§fn from(entry: RawCacheEntry<Lru<K, V, P>, S>) -> CacheEntry<K, V, S, P>
fn from(entry: RawCacheEntry<Lru<K, V, P>, S>) -> CacheEntry<K, V, S, P>
Converts to this type from the input type.
Source§impl<K, V, S, P> From<RawCacheEntry<S3Fifo<K, V, P>, S>> for CacheEntry<K, V, S, P>
impl<K, V, S, P> From<RawCacheEntry<S3Fifo<K, V, P>, S>> for CacheEntry<K, V, S, P>
Source§fn from(entry: RawCacheEntry<S3Fifo<K, V, P>, S>) -> CacheEntry<K, V, S, P>
fn from(entry: RawCacheEntry<S3Fifo<K, V, P>, S>) -> CacheEntry<K, V, S, P>
Converts to this type from the input type.
Auto Trait Implementations§
impl<K, V, S, P> Freeze for CacheEntry<K, V, S, P>
impl<K, V, S = BuildHasherDefault<AHasher>, P = CacheProperties> !RefUnwindSafe for CacheEntry<K, V, S, P>
impl<K, V, S, P> Send for CacheEntry<K, V, S, P>
impl<K, V, S, P> Sync for CacheEntry<K, V, S, P>
impl<K, V, S, P> Unpin for CacheEntry<K, V, S, P>
impl<K, V, S = BuildHasherDefault<AHasher>, P = CacheProperties> !UnwindSafe for CacheEntry<K, V, S, P>
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§impl<T, A> DynAccess<T> for A
impl<T, A> DynAccess<T> for A
Source§fn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
The equivalent of
Access::load
.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