Struct cart_cache::CartCache[][src]

pub struct CartCache<K, V> where
    K: Eq + Hash
{ /* fields omitted */ }

Implementations

impl<K: Eq + Hash, V> CartCache<K, V>[src]

pub fn new(capacity: usize) -> Result<CartCache<K, V>, &'static str>[src]

pub fn capacity(&self) -> usize[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn frequent_len(&self) -> usize[src]

pub fn recent_len(&self) -> usize[src]

pub fn inserted(&self) -> u64[src]

pub fn evicted(&self) -> u64[src]

pub fn clear(&mut self)[src]

pub fn contains_key<Q: ?Sized>(&self, key: &Q) -> bool where
    Q: Hash + Eq,
    K: Borrow<Q>, 
[src]

pub fn get<Q: ?Sized>(&mut self, key: &Q) -> Option<&V> where
    Q: Hash + Eq,
    K: Borrow<Q>, 
[src]

pub fn get_mut<Q: ?Sized>(&mut self, key: &Q) -> Option<&mut V> where
    Q: Hash + Eq,
    K: Borrow<Q>, 
[src]

pub fn insert(&mut self, key: K, value: V) -> bool where
    K: Hash + Eq + Clone
[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for CartCache<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe
[src]

impl<K, V> Send for CartCache<K, V> where
    K: Send,
    V: Send
[src]

impl<K, V> Sync for CartCache<K, V> where
    K: Sync,
    V: Sync
[src]

impl<K, V> Unpin for CartCache<K, V> where
    K: Unpin,
    V: Unpin
[src]

impl<K, V> UnwindSafe for CartCache<K, V> where
    K: UnwindSafe,
    V: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.