pub enum RemovalCause {
Expired,
Size,
Explicit,
Replaced,
}Expand description
The reason an entry was removed from the cache.
Variants§
Expired
The entry’s TTL or TTI passed and the cache’s background maintenance reaped it. This is distinct from a get-time expiration check.
Size
The cache was at capacity and the eviction policy selected this entry for removal.
Explicit
The entry was removed by an explicit
invalidate or
clear call.
Replaced
The entry’s value was replaced by a subsequent
insert with the same key.
Trait Implementations§
Source§impl Clone for RemovalCause
impl Clone for RemovalCause
Source§fn clone(&self) -> RemovalCause
fn clone(&self) -> RemovalCause
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RemovalCause
Source§impl Debug for RemovalCause
impl Debug for RemovalCause
impl Eq for RemovalCause
Source§impl Hash for RemovalCause
impl Hash for RemovalCause
Source§impl PartialEq for RemovalCause
impl PartialEq for RemovalCause
Source§fn eq(&self, other: &RemovalCause) -> bool
fn eq(&self, other: &RemovalCause) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RemovalCause
Auto Trait Implementations§
impl Freeze for RemovalCause
impl RefUnwindSafe for RemovalCause
impl Send for RemovalCause
impl Sync for RemovalCause
impl Unpin for RemovalCause
impl UnsafeUnpin for RemovalCause
impl UnwindSafe for RemovalCause
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.