pub trait LockedWrapperUnlockedApi<'a, T: 'a, L: 'a>: LockedWrapper<&'a T, L> {
// Provided methods
fn unlocked_access<M>(&self) -> T::Guard<'a>
where T: UnlockedAccess<M> { ... }
fn unlocked_access_with<M, X>(
&self,
f: impl FnOnce(&'a T) -> &'a X,
) -> X::Guard<'a>
where X: UnlockedAccess<M> { ... }
}
Expand description
Provides an API with the same shape as Locked
for any type implementing
LockedWrapper
.
Provided Methods§
Sourcefn unlocked_access<M>(&self) -> T::Guard<'a>where
T: UnlockedAccess<M>,
fn unlocked_access<M>(&self) -> T::Guard<'a>where
T: UnlockedAccess<M>,
Like Locked::unlocked_access
.
Sourcefn unlocked_access_with<M, X>(
&self,
f: impl FnOnce(&'a T) -> &'a X,
) -> X::Guard<'a>where
X: UnlockedAccess<M>,
fn unlocked_access_with<M, X>(
&self,
f: impl FnOnce(&'a T) -> &'a X,
) -> X::Guard<'a>where
X: UnlockedAccess<M>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.