summaryrefslogtreecommitdiff
path: root/src/mutex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mutex.rs')
-rw-r--r--src/mutex.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mutex.rs b/src/mutex.rs
index b30c2b1..433ab47 100644
--- a/src/mutex.rs
+++ b/src/mutex.rs
@@ -36,14 +36,18 @@ pub struct Mutex<T: ?Sized, R> {
data: UnsafeCell<T>,
}
-/// A reference to a mutex that unlocks it when dropped
+/// A reference to a mutex that unlocks it when dropped.
+///
+/// This is similar to [`MutexGuard`], except it does not hold a [`Keyable`].
pub struct MutexRef<'a, T: ?Sized + 'a, R: RawMutex>(
&'a Mutex<T, R>,
PhantomData<(&'a mut T, R::GuardMarker)>,
);
-/// An RAII implementation of a “scoped lock” of a mutex. When this structure
-/// is dropped (falls out of scope), the lock will be unlocked.
+/// An RAII implementation of a “scoped lock” of a mutex.
+///
+/// When this structure is dropped (falls out of scope), the lock will be
+/// unlocked.
///
/// This is created by calling the [`lock`] and [`try_lock`] methods on [`Mutex`]
///