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