pub struct TupleWrapper<A, B>(/* private fields */);
Expand description
A wrapper for tuples to support implementing Locked::adopt
.
Implementations§
Source§impl<A, B> TupleWrapper<A, B>
impl<A, B> TupleWrapper<A, B>
pub fn left(&self) -> &A::Target
pub fn right(&self) -> &B::Target
pub fn both(&self) -> (&A::Target, &B::Target)
pub fn cast_left<X, F: FnOnce(&A::Target) -> &X>( &self, f: F, ) -> OwnedTupleWrapper<&X, &B::Target>
pub fn cast_right<X, F: FnOnce(&B::Target) -> &X>( &self, f: F, ) -> OwnedTupleWrapper<&A::Target, &X>
Auto Trait Implementations§
impl<A, B> Freeze for TupleWrapper<A, B>
impl<A, B> RefUnwindSafe for TupleWrapper<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for TupleWrapper<A, B>
impl<A, B> Sync for TupleWrapper<A, B>
impl<A, B> Unpin for TupleWrapper<A, B>
impl<A, B> UnwindSafe for TupleWrapper<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
Source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.