From 4fd5136e0c0ec9cc92bb2b5735c0b3b68acdd755 Mon Sep 17 00:00:00 2001 From: Botahamec Date: Wed, 25 Sep 2024 21:36:13 -0400 Subject: Update docs for ref guards --- src/rwlock.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/rwlock.rs') 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); pub struct WriteLock<'l, T: ?Sized, R>(&'l RwLock); /// 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, 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, PhantomData<(&'a mut T, R::GuardMarker)>, -- cgit v1.2.3