Struct cros_async::sync::mu::RwLockReadGuard
source · pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
mu: &'a RwLock<T>,
value: &'a T,
}
Expand description
An RAII implementation of a “scoped shared lock” for a RwLock
. When this structure is dropped,
the lock will be released. The resource protected by the RwLock
can be accessed via the
Deref
implementation of this structure.
Fields§
§mu: &'a RwLock<T>
§value: &'a T
Implementations§
source§impl<'a, T: ?Sized> RwLockReadGuard<'a, T>
impl<'a, T: ?Sized> RwLockReadGuard<'a, T>
pub(crate) fn into_inner(self) -> &'a RwLock<T>
pub(crate) fn as_raw_rwlock(&self) -> &RawRwLock
Trait Implementations§
source§impl<'a, T: ?Sized> Deref for RwLockReadGuard<'a, T>
impl<'a, T: ?Sized> Deref for RwLockReadGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for RwLockReadGuard<'a, T>
impl<'a, T: ?Sized> Send for RwLockReadGuard<'a, T>
impl<'a, T: ?Sized> Sync for RwLockReadGuard<'a, T>
impl<'a, T: ?Sized> Unpin for RwLockReadGuard<'a, T>
impl<'a, T> !UnwindSafe for RwLockReadGuard<'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