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