pub enum Priority {
Low,
Normal,
High,
NeverRemove,
}Expand description
Memory-eviction priority hint, mirroring CacheItemPriority.
The in-memory backend (moka) uses a TinyLFU policy and does not honour an
explicit priority; this is retained for API parity and forwarded where a
backend can use it. NeverRemove entries (e.g. internal tag markers) are
kept in a dedicated never-evicting structure instead.
Variants§
Low
Evicted first under memory pressure.
Normal
The default priority.
High
Evicted last under memory pressure.
NeverRemove
Never evicted by the size policy.
Trait Implementations§
impl Copy for Priority
impl Eq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnsafeUnpin for Priority
impl UnwindSafe for Priority
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§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.