Expand description
This struct implements a simple value cache that holds up to a certain
number of entries at a time.
When it reaches its maximum capacity it will drop the oldest unused entries.
All methods of this struct are thread-safe.
Creates a new SimpleCache with a given capacity.
Arguments:
max_size: Maximum number of items in the cache;
Gets the value from the cache if it exists. Read more
Inserts the value into the cache. Reinserting a new value with the
same key will replace the existing value. Read more
Removes all entries from the cache.
Returns the number of entries in the cache.
Returns true if the cache is empty or false otherwise.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,