pub struct RwLockWriteGuard<'a, T> { /* private fields */ }
Expand description
An RAII guard that releases the write lock when dropped
Implementations§
Source§impl<'a, T> RwLockWriteGuard<'a, T>
impl<'a, T> RwLockWriteGuard<'a, T>
Sourcepub fn unlock(self)
pub fn unlock(self)
Immediately drop the guard and release the write lock
Equivalent to [drop(self)], but is more self-documenting
Sourcepub async fn unlock_fair(self)
pub async fn unlock_fair(self)
Release the write lock and immediately yield control back to the async runtime
This essentially just calls Self::unlock then yield_now()
Trait Implementations§
Source§impl<T> Deref for RwLockWriteGuard<'_, T>
impl<T> Deref for RwLockWriteGuard<'_, T>
Source§impl<T> DerefMut for RwLockWriteGuard<'_, T>
impl<T> DerefMut for RwLockWriteGuard<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for RwLockWriteGuard<'a, T>
impl<'a, T> !RefUnwindSafe for RwLockWriteGuard<'a, T>
impl<'a, T> !Send for RwLockWriteGuard<'a, T>
impl<'a, T> !Sync for RwLockWriteGuard<'a, T>
impl<'a, T> Unpin for RwLockWriteGuard<'a, T>
impl<'a, T> !UnwindSafe for RwLockWriteGuard<'a, T>
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