diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-22 15:53:49 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-22 15:53:49 -0400 |
| commit | ebbe3cfce28914d776f3e5f89894fab50911c57e (patch) | |
| tree | 7ecb7357b9decbe37817eea57e51346aaf055438 /src/collection.rs | |
| parent | f5cb25b01f265c9247bd0cb8955addcbaa94fea2 (diff) | |
Implemented necessary traits
Diffstat (limited to 'src/collection.rs')
| -rw-r--r-- | src/collection.rs | 9 |
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, } |
