pub type RwLockWriteGuard<'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 RwLockWriteGuard<'a, T> { /* private fields */ }

Trait Implementations§

§

impl<'a, R, T> Debug for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: Debug + 'a + ?Sized,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'a, R, T> Deref for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: 'a + ?Sized,

§

type Target = T

The resulting type after dereferencing.
§

fn deref(&self) -> &T

Dereferences the value.
§

impl<'a, R, T> DerefMut for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: 'a + ?Sized,

§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
§

impl<'a, R, T> Display for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: Display + 'a + ?Sized,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'a, R, T> Drop for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: 'a + ?Sized,

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl<'a, R, T> Send for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: Send + 'a + ?Sized, <R as RawRwLock>::GuardMarker: Send,

§

impl<'a, R, T> Sync for MappedRwLockWriteGuard<'a, R, T>where R: RawRwLock + 'a, T: Sync + 'a + ?Sized,