summaryrefslogtreecommitdiff
path: root/src/collection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/collection.rs')
-rw-r--r--src/collection.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/collection.rs b/src/collection.rs
index 6623c8a..a84c1ce 100644
--- a/src/collection.rs
+++ b/src/collection.rs
@@ -8,6 +8,7 @@ mod owned;
mod r#ref;
mod retry;
+#[derive(Debug)]
pub struct OwnedLockCollection<L> {
data: L,
}
@@ -17,12 +18,16 @@ pub struct OwnedLockCollection<L> {
/// This could be a tuple of [`Lockable`] types, an array, or a `Vec`. But it
/// can be safely locked without causing a deadlock.
pub struct RefLockCollection<'a, L> {
- locks: Vec<&'a dyn Lock>,
data: &'a L,
+ locks: Vec<&'a dyn Lock>,
}
-pub struct BoxedLockCollection<'a, L: 'a>(RefLockCollection<'a, L>);
+pub struct BoxedLockCollection<L> {
+ data: Box<L>,
+ locks: Vec<&'static dyn Lock>,
+}
+#[derive(Debug)]
pub struct RetryingLockCollection<L> {
data: L,
}