pub trait Access<T> {
    fn load(&mut self) -> &T;
}
Expand description

Generalization of caches providing access to T.

This abstracts over all kinds of caches that can provide a cheap access to values of type T. This is useful in cases where some code doesn’t care if the T is the whole structure or just a part of it.

See the example at Cache::map.

Required Methods

Loads the value from cache.

This revalidates the value in the cache, then provides the access to the cached value.

Implementors