pub struct AsyncRwLockReadGuardForInner<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG>{ /* private fields */ }Expand description
Present a AsyncRwLockReadGuard instance as a SyncRcPtr for
the AsyncRwLock’s inner value (or any of its members).
Useful for presenting APIs with a SyncRcPtr to
the AsyncRwLock’s wrapped value or any of its members if needed.
Users are supposed to implement
DerefInnerByTag the AsyncRwLock’s
wrapped value’s type, for a TAG routing either to the AsyncRwLock’s
wrapped value itself or to one of its members.
Note that the AsyncRwLockReadGuardForInner (as well its cloning spawns)
own a read lock on the associated AsyncRwLock for its whole lifetime. In
particular it blocks other tasks waiting to acquire a write lock.
Trait Implementations§
Source§impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> Clone for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> Clone for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
Source§impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> Deref for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> Deref for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
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.
Source§impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> SyncRcPtr<<OT as DerefInnerByTag<TAG>>::Output> for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>where
OT: DerefInnerByTag<TAG> + Send + Sync,
<OT as DerefInnerByTag<TAG>>::Output: Sized + Send + Sync,
impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> SyncRcPtr<<OT as DerefInnerByTag<TAG>>::Output> for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>where
OT: DerefInnerByTag<TAG> + Send + Sync,
<OT as DerefInnerByTag<TAG>>::Output: Sized + Send + Sync,
Source§type WeakSyncRcPtr = AsyncRwLockReadWeakGuardForInner<ST, OT, LP, TAG>
type WeakSyncRcPtr = AsyncRwLockReadWeakGuardForInner<ST, OT, LP, TAG>
Weak pointer type returned by downgrade().
Source§type SyncRcPtrRef<'a> = GenericSyncRcPtrRef<'a, <OT as DerefInnerByTag<TAG>>::Output, AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>>
where
Self: 'a
type SyncRcPtrRef<'a> = GenericSyncRcPtrRef<'a, <OT as DerefInnerByTag<TAG>>::Output, AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>> where Self: 'a
Source§fn downgrade(&self) -> Self::WeakSyncRcPtr
fn downgrade(&self) -> Self::WeakSyncRcPtr
Downgrade to a
WeakSyncRcPtr.Source§fn into_raw(this: Self) -> *const <OT as DerefInnerByTag<TAG>>::Output
fn into_raw(this: Self) -> *const <OT as DerefInnerByTag<TAG>>::Output
Convert a
SyncRcPtr into a raw pointer. Read moreSource§fn as_ref(&self) -> Self::SyncRcPtrRef<'_>
fn as_ref(&self) -> Self::SyncRcPtrRef<'_>
Create a reference to the pointer. Read more
Source§impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> WeakSyncRcPtr<<OT as DerefInnerByTag<TAG>>::Output, AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>> for AsyncRwLockReadWeakGuardForInner<ST, OT, LP, TAG>where
OT: DerefInnerByTag<TAG> + Send + Sync,
<OT as DerefInnerByTag<TAG>>::Output: Sized + Send + Sync,
impl<ST: SyncTypes, OT, LP: SyncRcPtr<AsyncRwLock<ST, OT>>, TAG> WeakSyncRcPtr<<OT as DerefInnerByTag<TAG>>::Output, AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>> for AsyncRwLockReadWeakGuardForInner<ST, OT, LP, TAG>where
OT: DerefInnerByTag<TAG> + Send + Sync,
<OT as DerefInnerByTag<TAG>>::Output: Sized + Send + Sync,
Auto Trait Implementations§
impl<ST, OT, LP, TAG> Freeze for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST, OT, LP, TAG> RefUnwindSafe for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST, OT, LP, TAG> Send for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST, OT, LP, TAG> Sync for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST, OT, LP, TAG> Unpin for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST, OT, LP, TAG> UnsafeUnpin for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
impl<ST, OT, LP, TAG> UnwindSafe for AsyncRwLockReadGuardForInner<ST, OT, LP, TAG>
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