Struct cros_async::sync::mu::RwLockWriteGuard
source · pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
mu: &'a RwLock<T>,
value: &'a mut T,
}
Expand description
An RAII implementation of a “scoped exclusive lock” for a RwLock
. When this structure is
dropped, the lock will be released. The resource protected by the RwLock
can be accessed via
the Deref
and DerefMut
implementations of this structure.
Fields§
§mu: &'a RwLock<T>
§value: &'a mut T
Implementations§
source§impl<'a, T: ?Sized> RwLockWriteGuard<'a, T>
impl<'a, T: ?Sized> RwLockWriteGuard<'a, T>
pub(crate) fn into_inner(self) -> &'a RwLock<T>
pub(crate) fn as_raw_rwlock(&self) -> &RawRwLock
Trait Implementations§
source§impl<'a, T: ?Sized> Deref for RwLockWriteGuard<'a, T>
impl<'a, T: ?Sized> Deref for RwLockWriteGuard<'a, T>
source§impl<'a, T: ?Sized> DerefMut for RwLockWriteGuard<'a, T>
impl<'a, T: ?Sized> DerefMut for RwLockWriteGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for RwLockWriteGuard<'a, T>
impl<'a, T: ?Sized> Send for RwLockWriteGuard<'a, T>where
T: Send,
impl<'a, T: ?Sized> Sync for RwLockWriteGuard<'a, T>
impl<'a, T: ?Sized> 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