diff options
Diffstat (limited to 'src/collection.rs')
| -rw-r--r-- | src/collection.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/collection.rs b/src/collection.rs index 93adf16..a11d60c 100644 --- a/src/collection.rs +++ b/src/collection.rs @@ -1,4 +1,4 @@ -use std::{marker::PhantomData, ptr::NonNull}; +use std::marker::PhantomData; use crate::{ key::Keyable, @@ -9,6 +9,7 @@ mod boxed_collection; mod guard; mod owned_collection; mod ref_collection; +mod retry_collection; pub struct OwnedLockCollection<L> { data: L, @@ -25,9 +26,13 @@ pub struct RefLockCollection<'a, L> { pub struct BoxedLockCollection<'a, L>(RefLockCollection<'a, L>); +pub struct RetryingLockCollection<L> { + data: L, +} + /// A RAII guard for a generic [`Lockable`] type. -pub struct LockGuard<'a, 'key: 'a, L: Lockable<'a>, Key: Keyable + 'key> { - guard: L::Guard, +pub struct LockGuard<'g, 'key: 'g, L: Lockable + 'g, Key: Keyable + 'key> { + guard: L::Guard<'g>, key: Key, _phantom: PhantomData<&'key ()>, } |
