pub struct SimpleCache<K: Eq + Hash + Copy + Send + Sync, V: Send + Sync> { /* private fields */ }
Expand description
This struct implements a simple value cache that holds up to a certain number of entries at a time.
When it reaches its maximum capacity it will drop the oldest unused entries.
All methods of this struct are thread-safe.
Implementations§
Trait Implementations§
Source§impl<K: Eq + Hash + Copy + Send + Sync, V: Send + Sync> ValueCache<K, V> for SimpleCache<K, V>
impl<K: Eq + Hash + Copy + Send + Sync, V: Send + Sync> ValueCache<K, V> for SimpleCache<K, V>
Auto Trait Implementations§
impl<K, V> !Freeze for SimpleCache<K, V>
impl<K, V> RefUnwindSafe for SimpleCache<K, V>
impl<K, V> Send for SimpleCache<K, V>
impl<K, V> Sync for SimpleCache<K, V>
impl<K, V> Unpin for SimpleCache<K, V>where
K: Unpin,
impl<K, V> UnwindSafe for SimpleCache<K, V>
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