[−][src]Struct arc_cache::ArcCache
Methods
impl<K, V> ArcCache<K, V> where
K: Eq + Hash,
[src]
K: Eq + Hash,
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]
K: Borrow<Q>,
Q: Hash + Eq,
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]
K: Clone + Hash + Eq,
pub fn get_mut(&mut self, key: &K) -> Option<&mut V> where
K: Clone + Hash + Eq,
[src]
K: Clone + Hash + Eq,
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,
K: Send,
V: Send,
impl<K, V> Sync for ArcCache<K, V> where
K: Sync,
V: Sync,
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,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> RefUnwindSafe for ArcCache<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,