lock_order::wrap::disable

Trait LockedDisabledWrapperApi

Source
pub trait LockedDisabledWrapperApi<T, L>: LockedWrapper<T, L> + DisabledLockWrapper
where T: Deref, T::Target: Sized,
{
Show 21 methods // Provided methods fn lock<'a, M>(&'a mut self) -> <T::Target as LockFor<M>>::Guard<'a> where T: 'a, T::Target: LockFor<M>, L: LockBefore<M> + 'a { ... } fn lock_and<'a, M>( &'a mut self, ) -> (<T::Target as LockFor<M>>::Guard<'a>, Self::AtLockLevel<'a, Unlocked>) where T::Target: LockFor<M>, L: LockBefore<M> + 'a { ... } fn lock_with<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> X::Guard<'a> where T: 'a, X: LockFor<M>, L: LockBefore<M> + 'a { ... } fn lock_with_and<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> (X::Guard<'a>, Self::AtLockLevel<'a, Unlocked>) where X: LockFor<M>, L: LockBefore<M> + 'a { ... } fn read_lock<'a, M>( &'a mut self, ) -> <T::Target as RwLockFor<M>>::ReadGuard<'a> where T: 'a, T::Target: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn read_lock_and<'a, M>( &'a mut self, ) -> (<T::Target as RwLockFor<M>>::ReadGuard<'a>, Self::AtLockLevel<'a, Unlocked>) where T::Target: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn read_lock_with<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> X::ReadGuard<'a> where T: 'a, X: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn read_lock_with_and<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> (X::ReadGuard<'a>, Self::AtLockLevel<'a, Unlocked>) where X: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn write_lock<'a, M>( &'a mut self, ) -> <T::Target as RwLockFor<M>>::WriteGuard<'a> where T: 'a, T::Target: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn write_lock_and<'a, M>( &'a mut self, ) -> (<T::Target as RwLockFor<M>>::WriteGuard<'a>, Self::AtLockLevel<'a, Unlocked>) where T::Target: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn write_lock_with<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> X::WriteGuard<'a> where T: 'a, X: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn write_lock_with_and<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> (X::WriteGuard<'a>, Self::AtLockLevel<'a, Unlocked>) where X: RwLockFor<M>, L: LockBefore<M> + 'a { ... } fn as_owned(&mut self) -> Self::AtLockLevel<'_, L> { ... } fn cast<'a, R>(&'a mut self) -> Self::CastWrapper<&'a R> where T: 'a, L: 'a, T::Target: AsRef<R> { ... } fn cast_with<'a, R>( &'a mut self, f: impl FnOnce(&T::Target) -> &R, ) -> Self::CastWrapper<&'a R> where T: 'a, L: 'a { ... } fn cast_locked<'a, M>(&'a mut self) -> Self::AtLockLevel<'a, Unlocked> where L: LockBefore<M> + 'a { ... } fn copied(&self) -> T::Target where T::Target: Copy { ... } fn adopt<'a, N>( &'a mut self, n: &'a N, ) -> Self::CastWrapper<OwnedTupleWrapper<&'a T::Target, &'a N>> where T: 'a, L: 'a { ... } fn cast_left<'a, X, A: Deref + 'a, B: Deref + 'a, F: FnOnce(&A::Target) -> &X>( &'a mut self, f: F, ) -> Self::CastWrapper<OwnedTupleWrapper<&'a X, &'a B::Target>> where L: 'a, T: Deref<Target = TupleWrapper<A, B>> + 'a { ... } fn cast_right<'a, X, A: Deref + 'a, B: Deref + 'a, F: FnOnce(&B::Target) -> &X>( &'a mut self, f: F, ) -> Self::CastWrapper<OwnedTupleWrapper<&'a A::Target, &'a X>> where L: 'a, T: Deref<Target = TupleWrapper<A, B>> + 'a { ... } fn replace<'a, N>(&'a mut self, n: &'a N) -> Self::CastWrapper<&'a N> where L: 'a, T: 'a { ... }
}
Expand description

Provides an API with the same shape as Locked for any type implementing LockedWrapper that effectively disables lock ordering checks.

Provided Methods§

Source

fn lock<'a, M>(&'a mut self) -> <T::Target as LockFor<M>>::Guard<'a>
where T: 'a, T::Target: LockFor<M>, L: LockBefore<M> + 'a,

Source

fn lock_and<'a, M>( &'a mut self, ) -> (<T::Target as LockFor<M>>::Guard<'a>, Self::AtLockLevel<'a, Unlocked>)
where T::Target: LockFor<M>, L: LockBefore<M> + 'a,

Source

fn lock_with<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> X::Guard<'a>
where T: 'a, X: LockFor<M>, L: LockBefore<M> + 'a,

Source

fn lock_with_and<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> (X::Guard<'a>, Self::AtLockLevel<'a, Unlocked>)
where X: LockFor<M>, L: LockBefore<M> + 'a,

Source

fn read_lock<'a, M>(&'a mut self) -> <T::Target as RwLockFor<M>>::ReadGuard<'a>
where T: 'a, T::Target: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn read_lock_and<'a, M>( &'a mut self, ) -> (<T::Target as RwLockFor<M>>::ReadGuard<'a>, Self::AtLockLevel<'a, Unlocked>)
where T::Target: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn read_lock_with<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> X::ReadGuard<'a>
where T: 'a, X: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn read_lock_with_and<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> (X::ReadGuard<'a>, Self::AtLockLevel<'a, Unlocked>)
where X: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn write_lock<'a, M>( &'a mut self, ) -> <T::Target as RwLockFor<M>>::WriteGuard<'a>
where T: 'a, T::Target: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn write_lock_and<'a, M>( &'a mut self, ) -> (<T::Target as RwLockFor<M>>::WriteGuard<'a>, Self::AtLockLevel<'a, Unlocked>)
where T::Target: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn write_lock_with<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> X::WriteGuard<'a>
where T: 'a, X: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn write_lock_with_and<'a, M, X>( &'a mut self, f: impl FnOnce(&T::Target) -> &X, ) -> (X::WriteGuard<'a>, Self::AtLockLevel<'a, Unlocked>)
where X: RwLockFor<M>, L: LockBefore<M> + 'a,

Source

fn as_owned(&mut self) -> Self::AtLockLevel<'_, L>

Source

fn cast<'a, R>(&'a mut self) -> Self::CastWrapper<&'a R>
where T: 'a, L: 'a, T::Target: AsRef<R>,

Source

fn cast_with<'a, R>( &'a mut self, f: impl FnOnce(&T::Target) -> &R, ) -> Self::CastWrapper<&'a R>
where T: 'a, L: 'a,

Source

fn cast_locked<'a, M>(&'a mut self) -> Self::AtLockLevel<'a, Unlocked>
where L: LockBefore<M> + 'a,

Source

fn copied(&self) -> T::Target
where T::Target: Copy,

Source

fn adopt<'a, N>( &'a mut self, n: &'a N, ) -> Self::CastWrapper<OwnedTupleWrapper<&'a T::Target, &'a N>>
where T: 'a, L: 'a,

Source

fn cast_left<'a, X, A: Deref + 'a, B: Deref + 'a, F: FnOnce(&A::Target) -> &X>( &'a mut self, f: F, ) -> Self::CastWrapper<OwnedTupleWrapper<&'a X, &'a B::Target>>
where L: 'a, T: Deref<Target = TupleWrapper<A, B>> + 'a,

Source

fn cast_right<'a, X, A: Deref + 'a, B: Deref + 'a, F: FnOnce(&B::Target) -> &X>( &'a mut self, f: F, ) -> Self::CastWrapper<OwnedTupleWrapper<&'a A::Target, &'a X>>
where L: 'a, T: Deref<Target = TupleWrapper<A, B>> + 'a,

Source

fn replace<'a, N>(&'a mut self, n: &'a N) -> Self::CastWrapper<&'a N>
where L: 'a, T: 'a,

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<T, L, O> LockedDisabledWrapperApi<T, L> for O