pub struct AsyncRwLockReadGuard<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> { /* private fields */ }Expand description
Non-exclusive locking grant on an AsyncRwLock.
Besides the common functionality one would expect from a locking guard, it’s
noteworthy that a AsyncRwLockReadGuard instance can get presented as a
SyncRcPtr for the AsyncRwLock’s inner value (or any of
its members) via AsyncRwLockReadGuardForInner to APIs that expect such
one.
Implementations§
Source§impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockReadGuard<ST, T, LP>
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> AsyncRwLockReadGuard<ST, T, LP>
Sourcepub fn get_rwlock(&self) -> LP::SyncRcPtrRef<'_>
pub fn get_rwlock(&self) -> LP::SyncRcPtrRef<'_>
Obtain the associated AsyncRwLock.
Sourcepub fn into_rwlock(self) -> LP
pub fn into_rwlock(self) -> LP
Release the lock and return the associated AsyncRwLock.
Sourcepub fn into_weak(self) -> AsyncRwLockReadWeakGuard<ST, T, LP>
pub fn into_weak(self) -> AsyncRwLockReadWeakGuard<ST, T, LP>
Convert into an AsyncRwLockReadWeakGuard not hindering
destruction of the associated AsyncRwLock.
Trait Implementations§
Source§impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Clone for AsyncRwLockReadGuard<ST, T, LP>
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Clone for AsyncRwLockReadGuard<ST, T, LP>
Source§impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Deref for AsyncRwLockReadGuard<ST, T, LP>
impl<ST: SyncTypes, T: Send + Sync, LP: SyncRcPtr<AsyncRwLock<ST, T>>> Deref for AsyncRwLockReadGuard<ST, T, LP>
Source§impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> From<AsyncRwLockReadGuard<ST, OT, LP>> for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> From<AsyncRwLockReadGuard<ST, OT, LP>> for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
Source§fn from(value: AsyncRwLockReadGuard<ST, OT, LP>) -> Self
fn from(value: AsyncRwLockReadGuard<ST, OT, LP>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<ST, T, LP> Freeze for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Freeze,
impl<ST, T, LP> RefUnwindSafe for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: RefUnwindSafe,
impl<ST, T, LP> Send for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Send,
impl<ST, T, LP> Sync for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Sync,
impl<ST, T, LP> Unpin for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: Unpin,
impl<ST, T, LP> UnsafeUnpin for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<ST, T, SyncRcPtrForInner<AsyncRwLock<ST, T>, LP, AsyncRwLockIndexInnerSemTag>>: UnsafeUnpin,
impl<ST, T, LP> UnwindSafe for AsyncRwLockReadGuard<ST, T, LP>where
AsyncSemaphoreLeasesGuard<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