diff options
| author | Botahamec <botahamec@outlook.com> | 2024-09-25 21:36:13 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-09-25 21:36:13 -0400 |
| commit | 4fd5136e0c0ec9cc92bb2b5735c0b3b68acdd755 (patch) | |
| tree | 017bc3fd0e15ebb609383804b01651ee78bc4a3b /src/rwlock.rs | |
| parent | 7443474f1f00d2a9306079641dbb3c18df5e6445 (diff) | |
Update docs for ref guards
Diffstat (limited to 'src/rwlock.rs')
| -rw-r--r-- | src/rwlock.rs | 6 |
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)>, |
