Struct asset_lru::CostBasedLru [−][src]
Expand description
An LRU cache which bases eviction on the total cost (e.g. size) of the contained objects.
See crate-level documentation for details.
Implementations
pub fn remove<Q: ?Sized>(&mut self, key: &Q) -> Option<Arc<V>> where
Arc<K>: Borrow<Q>,
Q: Hash + Eq,
Add an entry to the cache. Return the old entry if this key was already present.
Iterator visiting entries in most-recently-used order.