Type Alias parking_lot::rwlock::MappedRwLockWriteGuard
source · pub type MappedRwLockWriteGuard<'a, T> = MappedRwLockWriteGuard<'a, RawRwLock, T>;
Expand description
An RAII write lock guard returned by RwLockWriteGuard::map
, which can point to a
subfield of the protected data.
The main difference between MappedRwLockWriteGuard
and RwLockWriteGuard
is that the
former doesn’t support temporarily unlocking and re-locking, since that
could introduce soundness issues if the locked object is modified by another
thread.
Aliased Type§
struct MappedRwLockWriteGuard<'a, T> {
raw: &'a RawRwLock,
data: *mut T,
marker: PhantomData<&'a mut T>,
}
Fields§
§raw: &'a RawRwLock
§data: *mut T
§marker: PhantomData<&'a mut T>