pub struct RwLockReadGuard<'a, T: ?Sized + 'a> { /* private fields */ }
Expand description
An RAII implementation of a “scoped shared read lock” of a RwLock.
When this instance is dropped (falls out of scope), the lock will be released.
The data protected by the RwLock can be accessed to read
through this guard via its Deref
implementation.
This instance is created by read
and try_read
methods on
RwLock
.
Trait Implementations§
Source§impl<T: Debug> Debug for RwLockReadGuard<'_, T>
impl<T: Debug> Debug for RwLockReadGuard<'_, T>
Source§impl<T: ?Sized> Deref for RwLockReadGuard<'_, T>
impl<T: ?Sized> Deref for RwLockReadGuard<'_, T>
Source§impl<T: ?Sized> Drop for RwLockReadGuard<'_, T>
impl<T: ?Sized> Drop for RwLockReadGuard<'_, T>
impl<T: ?Sized + Sync> Sync for RwLockReadGuard<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for RwLockReadGuard<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for RwLockReadGuard<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> !Send for RwLockReadGuard<'a, T>
impl<'a, T> Unpin for RwLockReadGuard<'a, T>where
T: ?Sized,
impl<'a, T> UnwindSafe for RwLockReadGuard<'a, T>where
T: RefUnwindSafe + ?Sized,
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