Struct freqache::LFUCache[][src]

pub struct LFUCache<K> { /* fields omitted */ }
Expand description

A weighted, thread-safe least-frequently-used cache

Implementations

Construct a new LFUCache.

Return true if the cache contains the given key.

Add a new key to the cache and return true is it was already present, otherwise false.

If already present, the key’s priority is increased by one.

Return true if the cache is empty.

Return the number of entries in this cache.

Remove an entry from the cache and return true if it was present or false if not.

Iterate over the keys in the cache, beginning with the least-frequently used.

Calling insert or remove while iterating will result in a deadlock.

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

Performs the conversion.

Performs the conversion.

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.