pub trait LockedWrapper<T, L>where
T: Deref,{
type AtLockLevel<'l, M>: LockedWrapper<&'l T::Target, M>
where M: 'l,
T: 'l;
type CastWrapper<X>: LockedWrapper<X, L>
where X: Deref,
X::Target: Sized;
// Required methods
fn wrap<'l, M>(locked: Locked<&'l T::Target, M>) -> Self::AtLockLevel<'l, M>
where M: 'l,
T: 'l;
fn wrap_cast<R: Deref>(locked: Locked<R, L>) -> Self::CastWrapper<R>
where R::Target: Sized;
fn get_mut(&mut self) -> &mut Locked<T, L>;
fn get(&self) -> &Locked<T, L>;
}
Expand description
A trait implemented by newtypes on Locked
Required Associated Types§
Sourcetype AtLockLevel<'l, M>: LockedWrapper<&'l T::Target, M>
where
M: 'l,
T: 'l
type AtLockLevel<'l, M>: LockedWrapper<&'l T::Target, M> where M: 'l, T: 'l
The same wrapper at a different lock level.
Sourcetype CastWrapper<X>: LockedWrapper<X, L>
where
X: Deref,
X::Target: Sized
type CastWrapper<X>: LockedWrapper<X, L> where X: Deref, X::Target: Sized
The same wrapper with a different locked state.
Required Methods§
Sourcefn wrap<'l, M>(locked: Locked<&'l T::Target, M>) -> Self::AtLockLevel<'l, M>where
M: 'l,
T: 'l,
fn wrap<'l, M>(locked: Locked<&'l T::Target, M>) -> Self::AtLockLevel<'l, M>where
M: 'l,
T: 'l,
Wraps Locked
into a newtype.
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.