[−][src]Struct loader_rs::cache::Cache
Trait Implementations
impl<K, V> Cached<K, V> for Cache<K, V> where
K: Eq + Hash,
[src]
K: Eq + Hash,
fn get(&self, key: &K) -> Option<Arc<V>>
[src]
fn set_from_arc(&self, key: K, value: Arc<V>)
[src]
fn remove(&self, key: &K)
[src]
fn clear(&self)
[src]
fn size(&self) -> usize
[src]
fn hits(&self) -> usize
[src]
fn misses(&self) -> usize
[src]
fn stats(&self) -> Stats
[src]
fn set(&self, key: K, value: V)
[src]
fn get_or_fetch_with_result<E, F: FnOnce(&K) -> Result<V, E>>(
&self,
key: K,
fetcher: F
) -> Result<Arc<V>, E>
[src]
&self,
key: K,
fetcher: F
) -> Result<Arc<V>, E>
fn get_or_fetch<F: Fn(&K) -> V>(&self, key: K, fetcher: F) -> Arc<V>
[src]
impl<K: Debug, V: Debug> Debug for Cache<K, V> where
K: Eq + Hash,
[src]
K: Eq + Hash,
impl<K, V> Default for Cache<K, V> where
K: Eq + Hash,
[src]
K: Eq + Hash,
impl<K, V> PartialEq<Cache<K, V>> for Cache<K, V> where
K: Eq + Hash,
V: PartialEq,
[src]
K: Eq + Hash,
V: PartialEq,
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Cache<K, V>
impl<K, V> Send for Cache<K, V>
impl<K, V> Sync for Cache<K, V>
impl<K, V> Unpin for Cache<K, V> where
K: Unpin,
K: Unpin,
impl<K, V> UnwindSafe for Cache<K, V>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,