pub struct OwnedMappedMutexGuard<T: ?Sized, U: ?Sized = T> { /* private fields */ }Expand description
A guard for a component U of the value of a Mutex<T> held through
an Arc, made by OwnedMutexGuard::map; unlocks on drop. The release
makes the progress MutexGuard’s does.
Implementations§
Source§impl<T: ?Sized, U: ?Sized> OwnedMappedMutexGuard<T, U>
impl<T: ?Sized, U: ?Sized> OwnedMappedMutexGuard<T, U>
Sourcepub fn map<S, F>(this: Self, f: F) -> OwnedMappedMutexGuard<T, S>
pub fn map<S, F>(this: Self, f: F) -> OwnedMappedMutexGuard<T, S>
A guard for a component of the component. It cannot fail: this guard already holds the lock.
An associated function, OwnedMappedMutexGuard::map(guard, f): a
method would shadow methods of the locked data.
Trait Implementations§
impl<T: ?Sized + Send, U: ?Sized + Send> Send for OwnedMappedMutexGuard<T, U>
impl<T: ?Sized + Send + Sync, U: ?Sized + Send + Sync> Sync for OwnedMappedMutexGuard<T, U>
Auto Trait Implementations§
impl<T, U = T> !RefUnwindSafe for OwnedMappedMutexGuard<T, U>
impl<T, U = T> !UnwindSafe for OwnedMappedMutexGuard<T, U>
impl<T, U> Freeze for OwnedMappedMutexGuard<T, U>
impl<T, U> Unpin for OwnedMappedMutexGuard<T, U>
impl<T, U> UnsafeUnpin for OwnedMappedMutexGuard<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