pub struct SharedMutexWriteGuard<'mutex, T: ?Sized + 'mutex> { /* private fields */ }
Expand description
An exclusive write guard on a SharedMutex.
Implementations§
Sourcepub fn into_mapped(self) -> MappedSharedMutexWriteGuard<'mutex, T>
pub fn into_mapped(self) -> MappedSharedMutexWriteGuard<'mutex, T>
Turn this guard into a guard which can be mapped to a sub-borrow.
Note that a mapped guard cannot wait on a Condvar
.
Sourcepub fn wait_for_write(self, cond: &Condvar) -> LockResult<Self>
pub fn wait_for_write(self, cond: &Condvar) -> LockResult<Self>
Wait on the given condition variable, and resume with another write lock.
Sourcepub fn wait_for_read(
self,
cond: &Condvar,
) -> LockResult<SharedMutexReadGuard<'mutex, T>>
pub fn wait_for_read( self, cond: &Condvar, ) -> LockResult<SharedMutexReadGuard<'mutex, T>>
Wait on the given condition variable, and resume with a read lock.
Trait Implementations§
Source§fn into(self) -> SharedMutexWriteGuard<'mutex, T>
fn into(self) -> SharedMutexWriteGuard<'mutex, T>
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more