pub struct MemoryLruCache<K: Eq + Hash, V> { /* private fields */ }
Expand description

An LRU-cache which operates on memory used.

Implementations

Create a new cache with a maximum size in bytes.

Insert an item.

Get a reference to an item in the cache. It is a logic error for its heap size to be altered while borrowed.

Currently-used size of values in bytes.

Get backing LRU cache instance (read only)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.