pub struct Cache<K: Hash + PartialEq + Eq + Clone, V: Clone> { /* private fields */ }Implementations§
Source§impl<K: Hash + PartialEq + Eq + Clone, V: Clone> Cache<K, V>
impl<K: Hash + PartialEq + Eq + Clone, V: Clone> Cache<K, V>
pub fn inner_clone(&self) -> FxHashMap<K, V>
pub fn inner_borrow_mut(&self) -> RefMut<'_, FxHashMap<K, V>>
pub fn get<F: FnMut(K) -> V>(&self, key: K, f: F) -> V
pub fn get_checked(&self, key: &K) -> Option<V>
pub fn contains(&self, key: &K) -> bool
pub fn insert(&self, key: K, value: V) -> bool
pub fn invalidate(&self, key: &K)
Trait Implementations§
Source§impl<'de, K, V> Deserialize<'de> for Cache<K, V>
impl<'de, K, V> Deserialize<'de> for Cache<K, V>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<K, V> !Freeze for Cache<K, V>
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>
impl<K, V> UnwindSafe for Cache<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more