pub struct OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r MutexValue>,
G: for<'r> Fn(&'r InnerValue) -> Option<&'r SubValue>,{ /* private fields */ }Expand description
A composed optional keypath chain from OptionalKeyPath through Arc<Mutex
Implementations§
Source§impl<Root, MutexValue, InnerValue, SubValue, F, G> OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r MutexValue>,
G: for<'r> Fn(&'r InnerValue) -> Option<&'r SubValue>,
MutexValue: Borrow<Arc<Mutex<InnerValue>>>,
impl<Root, MutexValue, InnerValue, SubValue, F, G> OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r MutexValue>,
G: for<'r> Fn(&'r InnerValue) -> Option<&'r SubValue>,
MutexValue: Borrow<Arc<Mutex<InnerValue>>>,
Sourcepub fn get<Callback>(self, container: &Root, callback: Callback) -> Option<()>
pub fn get<Callback>(self, container: &Root, callback: Callback) -> Option<()>
Apply the composed keypath chain to a container, executing callback with the value Consumes self - functional style (compose once, apply once)
Sourcepub fn then<NextValue, H>(
self,
next: KeyPath<SubValue, NextValue, H>,
) -> OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, 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>,
) -> OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, 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>,
) -> OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, 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>,
) -> OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, 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, MutexValue, InnerValue, SubValue, F, G> Freeze for OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> RefUnwindSafe for OptionalArcMutexOptionalKeyPathChain<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 OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> Sync for OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> Unpin for OptionalArcMutexOptionalKeyPathChain<Root, MutexValue, InnerValue, SubValue, F, G>
impl<Root, MutexValue, InnerValue, SubValue, F, G> UnwindSafe for OptionalArcMutexOptionalKeyPathChain<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