pub struct CartCache<K, V>{ /* private fields */ }Implementations§
Source§impl<K: Eq + Hash, V> CartCache<K, V>
impl<K: Eq + Hash, V> CartCache<K, V>
pub fn new(capacity: usize) -> Result<CartCache<K, V>, &'static str>
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn frequent_len(&self) -> usize
pub fn recent_len(&self) -> usize
pub fn inserted(&self) -> u64
pub fn evicted(&self) -> u64
pub fn clear(&mut self)
pub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn get<Q>(&mut self, key: &Q) -> Option<&V>
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
pub fn insert(&mut self, key: K, value: V) -> bool
Auto Trait Implementations§
impl<K, V> Freeze for CartCache<K, V>
impl<K, V> RefUnwindSafe for CartCache<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for CartCache<K, V>
impl<K, V> Sync for CartCache<K, V>
impl<K, V> Unpin for CartCache<K, V>
impl<K, V> UnwindSafe for CartCache<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