Struct cros_async::sync::mu::MutexGuard
source · [−]Expand description
An RAII implementation of a “scoped exclusive lock” for a Mutex
. When this structure is
dropped, the lock will be released. The resource protected by the Mutex
can be accessed via
the Deref
and DerefMut
implementations of this structure.
Fields
mu: &'a Mutex<T>
value: &'a mut T
Implementations
sourceimpl<'a, T: ?Sized> MutexGuard<'a, T>
impl<'a, T: ?Sized> MutexGuard<'a, T>
pub(crate) fn into_inner(self) -> &'a Mutex<T>
pub(crate) fn as_raw_mutex(&self) -> &RawMutex
Trait Implementations
sourceimpl<'a, T: ?Sized> Deref for MutexGuard<'a, T>
impl<'a, T: ?Sized> Deref for MutexGuard<'a, T>
sourceimpl<'a, T: ?Sized> DerefMut for MutexGuard<'a, T>
impl<'a, T: ?Sized> DerefMut for MutexGuard<'a, T>
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for MutexGuard<'a, T>
impl<'a, T: ?Sized> Send for MutexGuard<'a, T>where
T: Send,
impl<'a, T: ?Sized> Sync for MutexGuard<'a, T>where
T: Send + Sync,
impl<'a, T: ?Sized> Unpin for MutexGuard<'a, T>
impl<'a, T> !UnwindSafe for MutexGuard<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more