diff options
| author | Botahamec <botahamec@outlook.com> | 2024-09-27 21:48:35 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-09-27 21:48:35 -0400 |
| commit | 0140f58043a2a00312d31907253cc718985e1e6c (patch) | |
| tree | 7fda6116272523ef18182d44de63110be0a77f30 /src/collection/retry.rs | |
| parent | f3882eb6e4640572fc11a65ad6d450f058392403 (diff) | |
More implementations of LockableIntoInner and LockableAsMut
Diffstat (limited to 'src/collection/retry.rs')
| -rw-r--r-- | src/collection/retry.rs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/collection/retry.rs b/src/collection/retry.rs index b73788a..7aa4ef4 100644 --- a/src/collection/retry.rs +++ b/src/collection/retry.rs @@ -1,4 +1,6 @@ -use crate::lockable::{Lockable, OwnedLockable, RawLock, Sharable}; +use crate::lockable::{ + Lockable, LockableAsMut, LockableIntoInner, OwnedLockable, RawLock, Sharable, +}; use crate::Keyable; use std::collections::HashSet; @@ -174,6 +176,24 @@ unsafe impl<L: Lockable> Lockable for RetryingLockCollection<L> { } } +impl<L: LockableAsMut> LockableAsMut for RetryingLockCollection<L> { + type Inner<'a> = L::Inner<'a> + where + Self: 'a; + + fn as_mut(&mut self) -> Self::Inner<'_> { + self.data.as_mut() + } +} + +impl<L: LockableIntoInner> LockableIntoInner for RetryingLockCollection<L> { + type Inner = L::Inner; + + fn into_inner(self) -> Self::Inner { + self.data.into_inner() + } +} + unsafe impl<L: Sharable> Sharable for RetryingLockCollection<L> {} unsafe impl<L: OwnedLockable> OwnedLockable for RetryingLockCollection<L> {} |
