lock_order::wrap

Trait LockedWrapperUnlockedApi

Source
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§

Source

fn unlocked_access<M>(&self) -> T::Guard<'a>
where T: UnlockedAccess<M>,

Source

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.

Implementors§

Source§

impl<'a, O, T, L> LockedWrapperUnlockedApi<'a, T, L> for O
where T: 'a, L: 'a, O: LockedWrapper<&'a T, L>,