pub struct OwnedRwLockReadGuard<T: ?Sized, U: ?Sized = T> { /* private fields */ }Expand description
Shared access to a RwLock held through an Arc, to its value or to
a component U of it; releases on drop. The release makes the progress
RwLockReadGuard’s does.
Implementations§
Source§impl<T: ?Sized, U: ?Sized> OwnedRwLockReadGuard<T, U>
impl<T: ?Sized, U: ?Sized> OwnedRwLockReadGuard<T, U>
Sourcepub fn map<F, V>(this: Self, f: F) -> OwnedRwLockReadGuard<T, V>
pub fn map<F, V>(this: Self, f: F) -> OwnedRwLockReadGuard<T, V>
A guard for a component of the locked data. It cannot fail: this guard already holds a read.
An associated function, OwnedRwLockReadGuard::map(guard, f): a
method would shadow methods of the locked data.
Sourcepub fn try_map<F, V>(
this: Self,
f: F,
) -> Result<OwnedRwLockReadGuard<T, V>, Self>
pub fn try_map<F, V>( this: Self, f: F, ) -> Result<OwnedRwLockReadGuard<T, V>, Self>
map that gives the guard back when f finds no
component, with the read still held.
Trait Implementations§
impl<T: ?Sized + Send + Sync, U: ?Sized + Sync> Send for OwnedRwLockReadGuard<T, U>
impl<T: ?Sized + Send + Sync, U: ?Sized + Send + Sync> Sync for OwnedRwLockReadGuard<T, U>
Auto Trait Implementations§
impl<T, U = T> !RefUnwindSafe for OwnedRwLockReadGuard<T, U>
impl<T, U = T> !UnwindSafe for OwnedRwLockReadGuard<T, U>
impl<T, U> Freeze for OwnedRwLockReadGuard<T, U>
impl<T, U> Unpin for OwnedRwLockReadGuard<T, U>
impl<T, U> UnsafeUnpin for OwnedRwLockReadGuard<T, U>
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