Enum moka::notification::RemovalCause
source · pub enum RemovalCause {
Expired,
Explicit,
Replaced,
Size,
}
Available on crate features
sync
or future
only.Expand description
Indicates the reason why a cached entry was removed.
Variants§
Expired
The entry’s expiration timestamp has passed.
Explicit
The entry was manually removed by the user.
Replaced
The entry itself was not actually removed, but its value was replaced by the user.
Size
The entry was evicted due to size constraints.
Implementations§
source§impl RemovalCause
impl RemovalCause
pub fn was_evicted(&self) -> bool
Trait Implementations§
source§impl Clone for RemovalCause
impl Clone for RemovalCause
source§fn clone(&self) -> RemovalCause
fn clone(&self) -> RemovalCause
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 Debug for RemovalCause
impl Debug for RemovalCause
source§impl PartialEq<RemovalCause> for RemovalCause
impl PartialEq<RemovalCause> for RemovalCause
source§fn eq(&self, other: &RemovalCause) -> bool
fn eq(&self, other: &RemovalCause) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RemovalCause
impl Eq for RemovalCause
impl StructuralEq for RemovalCause
impl StructuralPartialEq for RemovalCause
Auto Trait Implementations§
impl RefUnwindSafe for RemovalCause
impl Send for RemovalCause
impl Sync for RemovalCause
impl Unpin 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