pub struct RwLockBellWriteGuard<'a, T> { /* private fields */ }Expand description
RAII write guard for RwLockBell.
Provides exclusive write access via Deref and DerefMut. Dropping
releases the lock and fires every callback registered via try_write_or
while this guard was held.
Returned by RwLockBell::write, RwLockBell::try_write, and
RwLockBell::try_write_or.
Implementations§
Source§impl<'a, T> RwLockBellWriteGuard<'a, T>
impl<'a, T> RwLockBellWriteGuard<'a, T>
Sourcepub fn map<U, F>(self, f: F) -> MappedRwLockBellWriteGuard<'a, U>
pub fn map<U, F>(self, f: F) -> MappedRwLockBellWriteGuard<'a, U>
Maps this guard to a subfield of the protected value.
Sourcepub fn try_map<U, F>(
self,
f: F,
) -> Result<MappedRwLockBellWriteGuard<'a, U>, Self>
pub fn try_map<U, F>( self, f: F, ) -> Result<MappedRwLockBellWriteGuard<'a, U>, Self>
Maps this guard to a subfield, returning Err(self) if f returns None.
Sourcepub fn try_map_err<U, F, E>(
self,
f: F,
) -> Result<MappedRwLockBellWriteGuard<'a, U>, (Self, E)>
pub fn try_map_err<U, F, E>( self, f: F, ) -> Result<MappedRwLockBellWriteGuard<'a, U>, (Self, E)>
Maps this guard to a subfield, returning Err((self, e)) if f returns Err(e).
Trait Implementations§
Source§impl<'a, T: Debug> Debug for RwLockBellWriteGuard<'a, T>
impl<'a, T: Debug> Debug for RwLockBellWriteGuard<'a, T>
Source§impl<'a, T> Deref for RwLockBellWriteGuard<'a, T>
impl<'a, T> Deref for RwLockBellWriteGuard<'a, T>
Source§impl<'a, T> DerefMut for RwLockBellWriteGuard<'a, T>
impl<'a, T> DerefMut for RwLockBellWriteGuard<'a, T>
Source§impl<'a, T> Drop for RwLockBellWriteGuard<'a, T>
impl<'a, T> Drop for RwLockBellWriteGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for RwLockBellWriteGuard<'a, T>
impl<'a, T> !Send for RwLockBellWriteGuard<'a, T>
impl<'a, T> !UnwindSafe for RwLockBellWriteGuard<'a, T>
impl<'a, T> Freeze for RwLockBellWriteGuard<'a, T>
impl<'a, T> Sync for RwLockBellWriteGuard<'a, T>where
T: Sync,
impl<'a, T> Unpin for RwLockBellWriteGuard<'a, T>
impl<'a, T> UnsafeUnpin for RwLockBellWriteGuard<'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