pub trait LockedWrapperApi<T, L>: LockedWrapper<T, L>{
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, M>)
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, M>)
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, M>)
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, M>)
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, M>)
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, M>)
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, M>
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
.
Provided Methods§
Sourcefn lock_and<'a, M>(
&'a mut self,
) -> (<T::Target as LockFor<M>>::Guard<'a>, Self::AtLockLevel<'a, M>)
fn lock_and<'a, M>( &'a mut self, ) -> (<T::Target as LockFor<M>>::Guard<'a>, Self::AtLockLevel<'a, M>)
Like Locked::lock_and
.
Sourcefn 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<'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,
Like Locked::lock_with
.
Sourcefn lock_with_and<'a, M, X>(
&'a mut self,
f: impl FnOnce(&T::Target) -> &X,
) -> (X::Guard<'a>, Self::AtLockLevel<'a, M>)where
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, M>)where
X: LockFor<M>,
L: LockBefore<M> + 'a,
Like Locked::lock_with_and
.
Sourcefn read_lock<'a, M>(&'a mut self) -> <T::Target as RwLockFor<M>>::ReadGuard<'a>
fn read_lock<'a, M>(&'a mut self) -> <T::Target as RwLockFor<M>>::ReadGuard<'a>
Like Locked::read_lock
.
Sourcefn read_lock_and<'a, M>(
&'a mut self,
) -> (<T::Target as RwLockFor<M>>::ReadGuard<'a>, Self::AtLockLevel<'a, M>)
fn read_lock_and<'a, M>( &'a mut self, ) -> (<T::Target as RwLockFor<M>>::ReadGuard<'a>, Self::AtLockLevel<'a, M>)
Like Locked::read_lock_and
.
Sourcefn 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<'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,
Like Locked::read_lock_with
.
Sourcefn read_lock_with_and<'a, M, X>(
&'a mut self,
f: impl FnOnce(&T::Target) -> &X,
) -> (X::ReadGuard<'a>, Self::AtLockLevel<'a, M>)where
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, M>)where
X: RwLockFor<M>,
L: LockBefore<M> + 'a,
Sourcefn write_lock<'a, M>(
&'a mut self,
) -> <T::Target as RwLockFor<M>>::WriteGuard<'a>
fn write_lock<'a, M>( &'a mut self, ) -> <T::Target as RwLockFor<M>>::WriteGuard<'a>
Like Locked::write_lock
.
Sourcefn write_lock_and<'a, M>(
&'a mut self,
) -> (<T::Target as RwLockFor<M>>::WriteGuard<'a>, Self::AtLockLevel<'a, M>)
fn write_lock_and<'a, M>( &'a mut self, ) -> (<T::Target as RwLockFor<M>>::WriteGuard<'a>, Self::AtLockLevel<'a, M>)
Like Locked::write_lock_and
.
Sourcefn 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<'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,
Like Locked::write_lock_with
.
Sourcefn write_lock_with_and<'a, M, X>(
&'a mut self,
f: impl FnOnce(&T::Target) -> &X,
) -> (X::WriteGuard<'a>, Self::AtLockLevel<'a, M>)where
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, M>)where
X: RwLockFor<M>,
L: LockBefore<M> + 'a,
Sourcefn as_owned(&mut self) -> Self::AtLockLevel<'_, L>
fn as_owned(&mut self) -> Self::AtLockLevel<'_, L>
Like Locked::as_owned
.
Sourcefn cast<'a, R>(&'a mut self) -> Self::CastWrapper<&'a R>
fn cast<'a, R>(&'a mut self) -> Self::CastWrapper<&'a R>
Like Locked::cast
.
Sourcefn cast_with<'a, R>(
&'a mut self,
f: impl FnOnce(&T::Target) -> &R,
) -> Self::CastWrapper<&'a R>where
T: 'a,
L: 'a,
fn cast_with<'a, R>(
&'a mut self,
f: impl FnOnce(&T::Target) -> &R,
) -> Self::CastWrapper<&'a R>where
T: 'a,
L: 'a,
Like Locked::cast_with
Sourcefn cast_locked<'a, M>(&'a mut self) -> Self::AtLockLevel<'a, M>where
L: LockBefore<M> + 'a,
fn cast_locked<'a, M>(&'a mut self) -> Self::AtLockLevel<'a, M>where
L: LockBefore<M> + 'a,
Like Locked::cast_locked
.
Sourcefn adopt<'a, N>(
&'a mut self,
n: &'a N,
) -> Self::CastWrapper<OwnedTupleWrapper<&'a T::Target, &'a N>>where
T: 'a,
L: 'a,
fn adopt<'a, N>(
&'a mut self,
n: &'a N,
) -> Self::CastWrapper<OwnedTupleWrapper<&'a T::Target, &'a N>>where
T: 'a,
L: 'a,
Like Locked::adopt
.
Sourcefn 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_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,
Like Locked::cast_left
.
Sourcefn 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 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,
Like Locked::cast_right
.
Sourcefn replace<'a, N>(&'a mut self, n: &'a N) -> Self::CastWrapper<&'a N>where
L: 'a,
T: 'a,
fn replace<'a, N>(&'a mut self, n: &'a N) -> Self::CastWrapper<&'a N>where
L: 'a,
T: 'a,
Like Locked::replace
.
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.