Struct ref_stable_lru::LruCache
source · pub struct LruCache<'brand, K, V> { /* private fields */ }Implementations§
source§impl<'brand, K: Eq + Hash, V> LruCache<'brand, K, V>
impl<'brand, K: Eq + Hash, V> LruCache<'brand, K, V>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn cap(&self) -> NonZeroUsize
pub fn put<'cache, 'perm>( &'cache mut self, k: K, v: V, _perm: &'perm mut ValuePerm<'brand> ) -> Option<V>
pub fn get<'cache, 'perm>( &'cache mut self, k: &K, _perm: &'perm ValuePerm<'brand> ) -> Option<&'perm V>
pub fn peek_mut<'cache, 'perm>( &'cache self, k: &K, _perm: &'perm ValuePerm<'brand> ) -> Option<&'perm mut V>
Auto Trait Implementations§
impl<'brand, K, V> RefUnwindSafe for LruCache<'brand, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'brand, K, V> !Send for LruCache<'brand, K, V>
impl<'brand, K, V> !Sync for LruCache<'brand, K, V>
impl<'brand, K, V> Unpin for LruCache<'brand, K, V>
impl<'brand, K, V> UnwindSafe for LruCache<'brand, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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