pub trait Lockable<K, V> {
type Guard<'a>
where
Self: 'a,
K: 'a,
V: 'a;
type OwnedGuard;
}Expand description
A common trait for both LockableHashMap and LockableLruCache that offers some common functionalities.
Required Associated Types
sourcetype Guard<'a>
where
Self: 'a,
K: 'a,
V: 'a
type Guard<'a>
where
Self: 'a,
K: 'a,
V: 'a
A non-owning guard holding a lock for an entry in a LockableHashMap or a LockableLruCache. This guard is created via LockableHashMap::blocking_lock, LockableHashMap::async_lock or LockableHashMap::try_lock, or the corresponding LockableLruCache methods, and its lifetime is bound to the lifetime of the LockableHashMap/LockableLruCache.
See the documentation of Guard for methods.
sourcetype OwnedGuard
type OwnedGuard
A owning guard holding a lock for an entry in a LockableHashMap or a LockableLruCache. This guard is created via LockableHashMap::blocking_lock_owned, LockableHashMap::async_lock_owned or LockableHashMap::try_lock_owned, or the corresponding LockableLruCache methods, and its lifetime is bound to the lifetime of the LockableHashMap/LockableLruCache within its Arc.
See the documentation of Guard for methods.