Struct async_std::sync::MutexGuard [−][src]
pub struct MutexGuard<'a, T>(_)
where
T: ?Sized;
A guard that releases the mutex when dropped.
Implementations
impl<'a, T> MutexGuard<'a, T> where
T: ?Sized,
[src]
impl<'a, T> MutexGuard<'a, T> where
T: ?Sized,
[src]pub fn source(guard: &MutexGuard<'a, T>) -> &'a Mutex<T>
[src]
Returns a reference to the mutex a guard came from.
Examples
use async_lock::{Mutex, MutexGuard}; let mutex = Mutex::new(10i32); let guard = mutex.lock().await; dbg!(MutexGuard::source(&guard));
Trait Implementations
impl<'_, T> Debug for MutexGuard<'_, T> where
T: Debug + ?Sized,
[src]
impl<'_, T> Debug for MutexGuard<'_, T> where
T: Debug + ?Sized,
[src]impl<'_, T> Deref for MutexGuard<'_, T> where
T: ?Sized,
[src]
impl<'_, T> Deref for MutexGuard<'_, T> where
T: ?Sized,
[src]impl<'_, T> DerefMut for MutexGuard<'_, T> where
T: ?Sized,
[src]
impl<'_, T> DerefMut for MutexGuard<'_, T> where
T: ?Sized,
[src]impl<'_, T> Display for MutexGuard<'_, T> where
T: Display + ?Sized,
[src]
impl<'_, T> Display for MutexGuard<'_, T> where
T: Display + ?Sized,
[src]impl<'_, T> Send for MutexGuard<'_, T> where
T: Send + ?Sized,
[src]
T: Send + ?Sized,
impl<'_, T> Sync for MutexGuard<'_, T> where
T: Sync + ?Sized,
[src]
T: Sync + ?Sized,