pub struct MemoCache<T> { /* private fields */ }Expand description
MemoCache is a struct that represents a cache with a set capacity. It uses an LRU (Least Recently Used) eviction policy.
Implementations§
Source§impl<T> MemoCache<T>
impl<T> MemoCache<T>
Sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Size returns the current size of the MemoCache. It is the number of items currently stored in the cache.
Auto Trait Implementations§
impl<T> Freeze for MemoCache<T>
impl<T> RefUnwindSafe for MemoCache<T>where
T: RefUnwindSafe,
impl<T> Send for MemoCache<T>where
T: Send,
impl<T> Sync for MemoCache<T>where
T: Sync,
impl<T> Unpin for MemoCache<T>where
T: Unpin,
impl<T> UnsafeUnpin for MemoCache<T>
impl<T> UnwindSafe for MemoCache<T>where
T: 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