[][src]Struct arc_cache::ArcCache

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

Methods

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

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

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

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

pub fn peek_mut(&mut self, key: &K) -> Option<&mut V> where
    K: Clone + Hash + Eq
[src]

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

pub fn remove(&mut self, key: &K) -> Option<V>[src]

pub fn len(&self) -> usize[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 removed(&self) -> u64[src]

Auto Trait Implementations

impl<K, V> Send for ArcCache<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for ArcCache<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for ArcCache<K, V>

impl<K, V> UnwindSafe for ArcCache<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> RefUnwindSafe for ArcCache<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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