summaryrefslogtreecommitdiff
path: root/src/rwlock.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-09-25 21:36:13 -0400
committerBotahamec <botahamec@outlook.com>2024-09-25 21:36:13 -0400
commit4fd5136e0c0ec9cc92bb2b5735c0b3b68acdd755 (patch)
tree017bc3fd0e15ebb609383804b01651ee78bc4a3b /src/rwlock.rs
parent7443474f1f00d2a9306079641dbb3c18df5e6445 (diff)
Update docs for ref guards
Diffstat (limited to 'src/rwlock.rs')
-rw-r--r--src/rwlock.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rwlock.rs b/src/rwlock.rs
index 8f1ba8f..5715f89 100644
--- a/src/rwlock.rs
+++ b/src/rwlock.rs
@@ -69,12 +69,18 @@ pub struct ReadLock<'l, T: ?Sized, R>(&'l RwLock<T, R>);
pub struct WriteLock<'l, T: ?Sized, R>(&'l RwLock<T, R>);
/// RAII structure that unlocks the shared read access to a [`RwLock`]
+///
+/// This is similar to [`RwLockReadRef`], except it does not hold a
+/// [`Keyable`].
pub struct RwLockReadRef<'a, T: ?Sized, R: RawRwLock>(
&'a RwLock<T, R>,
PhantomData<(&'a mut T, R::GuardMarker)>,
);
/// RAII structure that unlocks the exclusive write access to a [`RwLock`]
+///
+/// This is similar to [`RwLockWriteRef`], except it does not hold a
+/// [`Keyable`].
pub struct RwLockWriteRef<'a, T: ?Sized, R: RawRwLock>(
&'a RwLock<T, R>,
PhantomData<(&'a mut T, R::GuardMarker)>,