pub struct AsyncRwLockWriteWeakGuard<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> { /* private fields */ }Expand description
Weak variant of AsyncRwLockWriteGuard not hindering destruction of the
associated AsyncRwLock.
In cases were it’s desired that long-living locking grants don’t prevent a
destruction of the associated AsyncRwLock, or to break cycles, a
AsyncRwLockWriteWeakGuard may be used. To be obtained via
AsyncRwLockWriteGuard::into_weak().
An AsyncRwLockWriteWeakGuard may get converted back into a full
AsyncRwLockWriteGuard via upgrade().
Implementations§
Source§impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockWriteWeakGuard<ST, T, LP>
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockWriteWeakGuard<ST, T, LP>
Sourcepub fn upgrade(self) -> Option<AsyncRwLockWriteGuard<ST, T, LP>>
pub fn upgrade(self) -> Option<AsyncRwLockWriteGuard<ST, T, LP>>
Attempt to convert back into an AsyncRwLockWriteGuard.
Returns the AsyncRwLockWriteGuard wrapped in Some if the
associated AsyncRwLock is still alive, `None otherwise.
Auto Trait Implementations§
impl<ST, T, LP> Freeze for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Freeze,
impl<ST, T, LP> RefUnwindSafe for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: RefUnwindSafe,
impl<ST, T, LP> Send for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Send,
impl<ST, T, LP> Sync for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Sync,
impl<ST, T, LP> Unpin for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Unpin,
impl<ST, T, LP> UnsafeUnpin for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnsafeUnpin,
impl<ST, T, LP> UnwindSafe for AsyncRwLockWriteWeakGuard<ST, T, LP>where
AsyncSemaphoreExclusiveAllWeakGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnwindSafe,
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