pub struct LruMap<K: PartialEq + Clone, V: Clone> { /* private fields */ }Expand description
A map with LRU (least-recently-used) eviction policy.
When the capacity is exceeded, the least-recently-used entry is removed. Useful for memoization caches inside the type checker.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for LruMap<K, V>
impl<K, V> RefUnwindSafe for LruMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for LruMap<K, V>
impl<K, V> Sync for LruMap<K, V>
impl<K, V> Unpin for LruMap<K, V>
impl<K, V> UnsafeUnpin for LruMap<K, V>
impl<K, V> UnwindSafe for LruMap<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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