Struct cros_async::sync::mu::MutexReadGuard
source · [−]Expand description
An RAII implementation of a “scoped shared 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
implementation of this structure.
Fields
mu: &'a Mutex<T>
value: &'a T
Implementations
sourceimpl<'a, T: ?Sized> MutexReadGuard<'a, T>
impl<'a, T: ?Sized> MutexReadGuard<'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 MutexReadGuard<'a, T>
impl<'a, T: ?Sized> Deref for MutexReadGuard<'a, T>
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for MutexReadGuard<'a, T>
impl<'a, T: ?Sized> Send for MutexReadGuard<'a, T>where
T: Send + Sync,
impl<'a, T: ?Sized> Sync for MutexReadGuard<'a, T>where
T: Send + Sync,
impl<'a, T: ?Sized> Unpin for MutexReadGuard<'a, T>
impl<'a, T> !UnwindSafe for MutexReadGuard<'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