pub struct FabricMutexGuard<'a, T: Copy> { /* private fields */ }Expand description
RAII guard returned by FabricMutex::lock and FabricMutex::try_lock.
Provides Deref and DerefMut
access to the locked value. On drop, writes the (potentially modified) value
back to leased memory and clears the holder_id, releasing the lock.
You can also call unlock explicitly to check
for write errors instead of silently ignoring them in Drop.
Implementations§
Trait Implementations§
Source§impl<'a, T: Copy> Deref for FabricMutexGuard<'a, T>
impl<'a, T: Copy> Deref for FabricMutexGuard<'a, T>
Source§impl<'a, T: Copy> DerefMut for FabricMutexGuard<'a, T>
impl<'a, T: Copy> DerefMut for FabricMutexGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for FabricMutexGuard<'a, T>where
T: Freeze,
impl<'a, T> !RefUnwindSafe for FabricMutexGuard<'a, T>
impl<'a, T> !Send for FabricMutexGuard<'a, T>
impl<'a, T> !Sync for FabricMutexGuard<'a, T>
impl<'a, T> Unpin for FabricMutexGuard<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for FabricMutexGuard<'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