pub struct OwnedRwLockReadGuard<T>where
T: ?Sized,{ /* private fields */ }
Expand description
Owned RAII structure used to release the shared read access of a
RwLock
when dropped.
This type is similar to the RwLockReadGuard
type, but it is only
returned by an RwLock
that is wrapped in an an Arc
. Instead
of borrowing the RwLock
, this guard holds an Arc
clone of
the RwLock
, incrementing its reference count. Therefore, this
type can outlive the RwLock
that created it, and it is valid for
the 'static
lifetime. Beyond this, it is identical to the
RwLockReadGuard
type.
The data protected by the RwLock
can be accessed through this
guard via its Deref
implementation.
This guard can be held across any .await
point, as it implements
Send
.
This structure is created by the read_owned
and
try_read_owned
methods on Arc
<
RwLock
>
.
Trait Implementations§
Source§impl<T> Debug for OwnedRwLockReadGuard<T>
impl<T> Debug for OwnedRwLockReadGuard<T>
Source§impl<T> Deref for OwnedRwLockReadGuard<T>where
T: ?Sized,
impl<T> Deref for OwnedRwLockReadGuard<T>where
T: ?Sized,
impl<T> Send for OwnedRwLockReadGuard<T>
impl<T> Sync for OwnedRwLockReadGuard<T>
Auto Trait Implementations§
impl<T> Freeze for OwnedRwLockReadGuard<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for OwnedRwLockReadGuard<T>
impl<T> Unpin for OwnedRwLockReadGuard<T>where
T: ?Sized,
impl<T> !UnwindSafe for OwnedRwLockReadGuard<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