pub struct EntryRef<'a, Cache, Key, Value>where
    Cache: EntryCache<Key, Value>,
{ /* private fields */ }
Expand description

A reference to an entry in a Least Recently Used map.

Implementations

Returns the key of this entry.

Returns the value of this entry.

This function touches the key, making it the most recently used key. This function only touches the key once. Subsequent calls will return the value without touching the key. This remains true until move_next() or move_previous() are invoked.

Touches this key, making it the most recently used key.

Returns the value of this entry.

This function does not touch the key, preserving its current position in the lru cache.

Returns the number of changes to the cache since this key was last touched.

Returns an iterator over the least-recently used keys beginning with the current entry.

Updates this reference to point to the next least recently used key in the list. Returns true if a next entry was found, or returns false if the entry is the last entry in the list.

Updates this reference to point to the next most recently used key in the list. Returns true if a previous entry was found, or returns false if the entry is the first entry in the list.

Removes and returns the current entry’s key and value.

Removes and returns the current entry’s key and value. If this was not the last entry, the next entry’s EntryRef will be returned.

Removes and returns the current entry’s key and value. If this was not the first entry, the previous entry’s EntryRef will be returned.

Removes the current entry. If this was not the last entry, the next entry’s EntryRef will be returned.

Removes the current entry. If this was not the first entry, the previous entry’s EntryRef will be returned.

Trait Implementations

Formats the value using the given formatter. Read more

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.