pub struct MappedMutex<'a, T> {
data: T,
lock: *const AtomicUsize,
phantom: PhantomData<&'a Mutex<T>>,
}
Expand description
An RAII mutex guard returned by MutexGuard::map()
.
This struct must not implement Send
.
Fields§
§data: T
§lock: *const AtomicUsize
§phantom: PhantomData<&'a Mutex<T>>
Trait Implementations§
Source§impl<T> Deref for MappedMutex<'_, T>
impl<T> Deref for MappedMutex<'_, T>
Source§impl<T> DerefMut for MappedMutex<'_, T>
impl<T> DerefMut for MappedMutex<'_, T>
Source§impl<T> Drop for MappedMutex<'_, T>
impl<T> Drop for MappedMutex<'_, T>
impl<T: Sync> Sync for MappedMutex<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for MappedMutex<'a, T>where
T: Freeze,
impl<'a, T> !RefUnwindSafe for MappedMutex<'a, T>
impl<'a, T> !Send for MappedMutex<'a, T>
impl<'a, T> Unpin for MappedMutex<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for MappedMutex<'a, T>
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