Expand description
The LruMap is a data structure that mimics a small subset of the standard
HashMap
but with the added feature that it keeps track of the least
recently used nodes and optionally supports setting a Time-To-Live duration
which can be used to drain nodes that have timed out.
Structs§
- Drain
- A draining
Iterator
that will on each iteration return ownership of the key/value pair of the next entry in the map. - Drain
Filter - A draining
Iterator
that will on each iteration call a closure which, if it returns true, will drain (remove and return) the current key/value pair. - Drain
Old - Drain
Ordered - Iterator that removes and returns every element in the LruMap.
- Drain
Overflow - Drain
Timedout - LruMap
- A HashMap which maintains an internal least recently used nodes list.