pub struct NutexGuard<'a, T: Sized> { /* private fields */ }Expand description
A custom handle that holds Nutex and contains MutexGuard of original Tokio Mutex.
The guard can be held across any .await point as it is Send thanks to the
original Tokio MutexGuard and Mutex.
As long as you have this guard, you have exclusive access to the underlying
T. The guard internally borrows the Nutex, so it guarantees that
Nutex reference won’t be dropped early.
Nutex will unlock automatically when guard drop.
Implementations§
Trait Implementations§
Source§impl<'a, T: Sized> Deref for NutexGuard<'a, T>
impl<'a, T: Sized> Deref for NutexGuard<'a, T>
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for NutexGuard<'a, T>
impl<'a, T> !UnwindSafe for NutexGuard<'a, T>
impl<'a, T> Freeze for NutexGuard<'a, T>
impl<'a, T> Send for NutexGuard<'a, T>where
T: Send,
impl<'a, T> Sync for NutexGuard<'a, T>
impl<'a, T> Unpin for NutexGuard<'a, T>
impl<'a, T> UnsafeUnpin for NutexGuard<'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