pub struct ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> &'r Arc<Mutex<RawMutex, InnerValue>>,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,{ /* private fields */ }Expand description
A composed keypath chain through Arc<parking_lot::Mutex
Implementations§
Source§impl<Root, InnerValue, SubValue, F, G> ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> &'r Arc<Mutex<RawMutex, InnerValue>>,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,
impl<Root, InnerValue, SubValue, F, G> ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> &'r Arc<Mutex<RawMutex, InnerValue>>,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,
Sourcepub fn get<Callback>(self, container: &Root, callback: Callback)
pub fn get<Callback>(self, container: &Root, callback: Callback)
Apply the composed keypath chain to a container (read)
Sourcepub fn then<NextValue, H>(
self,
next: KeyPath<SubValue, NextValue, H>,
) -> ArcParkingMutexKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r InnerValue) + 'static>where
H: for<'r> Fn(&'r SubValue) -> &'r NextValue + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
pub fn then<NextValue, H>(
self,
next: KeyPath<SubValue, NextValue, H>,
) -> ArcParkingMutexKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r InnerValue) + 'static>where
H: for<'r> Fn(&'r SubValue) -> &'r NextValue + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
Chain with another readable keypath through another level
Sourcepub fn chain_optional<NextValue, H>(
self,
next: OptionalKeyPath<SubValue, NextValue, H>,
) -> ArcParkingMutexOptionalKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r InnerValue) + 'static>where
H: for<'r> Fn(&'r SubValue) -> Option<&'r NextValue> + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
pub fn chain_optional<NextValue, H>(
self,
next: OptionalKeyPath<SubValue, NextValue, H>,
) -> ArcParkingMutexOptionalKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r InnerValue) + 'static>where
H: for<'r> Fn(&'r SubValue) -> Option<&'r NextValue> + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
Chain with an optional readable keypath through another level
Auto Trait Implementations§
impl<Root, InnerValue, SubValue, F, G> Freeze for ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> !RefUnwindSafe for ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Send for ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Sync for ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Unpin for ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> !UnwindSafe for ArcParkingMutexKeyPathChain<Root, InnerValue, SubValue, F, G>
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