pub struct MetaCache<K, V> {
pub entries: HashMap<K, V>,
pub capacity: usize,
pub hits: u64,
pub misses: u64,
}Expand description
A simple cache for memoizing meta computations.
Fields§
§entries: HashMap<K, V>§capacity: usize§hits: u64§misses: u64Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for MetaCache<K, V>
impl<K, V> RefUnwindSafe for MetaCache<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for MetaCache<K, V>
impl<K, V> Sync for MetaCache<K, V>
impl<K, V> Unpin for MetaCache<K, V>
impl<K, V> UnsafeUnpin for MetaCache<K, V>
impl<K, V> UnwindSafe for MetaCache<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