Struct cached::stores::UnboundCache

source ·
pub struct UnboundCache<K, V> { /* private fields */ }
Expand description

Default unbounded cache

This cache has no size limit or eviction policy.

Note: This cache is in-memory only

Implementations

Creates an empty UnboundCache

Creates an empty UnboundCache with a given pre-allocated capacity

Trait Implementations

Attempt to retrieve a cached value
Insert a key, value pair
Remove a cached value
Remove all cached values
Return the current cache size (number of elements)
Return the number of times a cached value was successfully retrieved
Return the number of times a cached value was unable to be retrieved
Return the cache capacity
Return the lifespan of cached values (time to eviction)

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.