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