pub struct ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>{ /* private fields */ }Expand description
A composed keypath chain through Arc<Mutex
§Example
// Functional style: compose first, then apply container at get()
ContainerTest::mutex_data_r()
.then_arc_mutex_at_kp(SomeStruct::data_r())
.get(&container, |value| println!("Value: {}", value));Implementations§
Source§impl<Root, MutexValue, InnerValue, SubValue, F, G> ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> &'r MutexValue,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,
MutexValue: Borrow<Arc<Mutex<InnerValue>>>,
impl<Root, MutexValue, InnerValue, SubValue, F, G> ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> &'r MutexValue,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,
MutexValue: Borrow<Arc<Mutex<InnerValue>>>,
Auto Trait Implementations§
impl<Root, MutexValue, InnerValue, SubValue, F, G> Freeze for ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> RefUnwindSafe for ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: RefUnwindSafe,
G: RefUnwindSafe,
Root: RefUnwindSafe,
MutexValue: RefUnwindSafe,
InnerValue: RefUnwindSafe,
SubValue: RefUnwindSafe,
impl<Root, MutexValue, InnerValue, SubValue, F, G> Send for ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> Sync for ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> Unpin for ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> UnwindSafe for ArcMutexKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: UnwindSafe,
G: UnwindSafe,
Root: UnwindSafe,
MutexValue: UnwindSafe,
InnerValue: UnwindSafe,
SubValue: 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