pub struct MemoryCache<K, V> { /* private fields */ }Expand description
Unbounded in-memory HashMap-backed cache.
Implementations§
Source§impl<K, V> MemoryCache<K, V>
impl<K, V> MemoryCache<K, V>
Sourcepub fn new() -> MemoryCache<K, V>
pub fn new() -> MemoryCache<K, V>
Construct an empty MemoryCache.
Trait Implementations§
Source§impl<K, V> CacheBackend<K, V> for MemoryCache<K, V>
impl<K, V> CacheBackend<K, V> for MemoryCache<K, V>
Source§impl<K, V> Default for MemoryCache<K, V>
impl<K, V> Default for MemoryCache<K, V>
Source§fn default() -> MemoryCache<K, V>
fn default() -> MemoryCache<K, V>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<K, V> !Freeze for MemoryCache<K, V>
impl<K, V> !RefUnwindSafe for MemoryCache<K, V>
impl<K, V> Send for MemoryCache<K, V>
impl<K, V> Sync for MemoryCache<K, V>
impl<K, V> Unpin for MemoryCache<K, V>
impl<K, V> UnsafeUnpin for MemoryCache<K, V>
impl<K, V> !UnwindSafe for MemoryCache<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