summaryrefslogtreecommitdiff
path: root/src/collection.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-05-21 13:18:10 -0400
committerBotahamec <botahamec@outlook.com>2024-05-21 13:18:10 -0400
commit6e3aa5182604b30ef75ba5676e9f677cc1d18fe3 (patch)
treed8e23a82c8151c4b49c15f49707d96651764db39 /src/collection.rs
parent875d5c4ad6e0c2a78c15476584fc686121b340d3 (diff)
parentc344021797b7e1f8027bd9d1302908f0767e362b (diff)
Merge remote-tracking branch 'origin/0.2' into 0.2
Diffstat (limited to 'src/collection.rs')
-rw-r--r--src/collection.rs11
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 ()>,
}