Trait arc_swap::cache::Access [−][src]
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
fn load(&mut self) -> &T
[src]
Loads the value from cache.
This revalidates the value in the cache, then provides the access to the cached value.
Implementors
impl<A, T, S> Access<<T as Deref>::Target> for Cache<A, T> where
A: Deref<Target = ArcSwapAny<T, S>>,
T: Deref<Target = <T as RefCnt>::Base> + RefCnt,
S: LockStorage,
[src]
A: Deref<Target = ArcSwapAny<T, S>>,
T: Deref<Target = <T as RefCnt>::Base> + RefCnt,
S: LockStorage,
impl<A, T, S, F, U> Access<U> for MapCache<A, T, F> where
A: Deref<Target = ArcSwapAny<T, S>>,
T: RefCnt,
S: LockStorage,
F: FnMut(&T) -> &U,
[src]
A: Deref<Target = ArcSwapAny<T, S>>,
T: RefCnt,
S: LockStorage,
F: FnMut(&T) -> &U,