pub struct OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r Arc<RwLock<RawRwLock, InnerValue>>>,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,{ /* private fields */ }Expand description
A composed keypath chain from optional keypath through Arc<parking_lot::RwLock
Implementations§
Source§impl<Root, InnerValue, SubValue, F, G> OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r Arc<RwLock<RawRwLock, InnerValue>>>,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,
impl<Root, InnerValue, SubValue, F, G> OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r Arc<RwLock<RawRwLock, InnerValue>>>,
G: for<'r> Fn(&'r InnerValue) -> &'r SubValue,
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 (read lock)
Sourcepub fn then<NextValue, H>(
self,
next: KeyPath<SubValue, NextValue, H>,
) -> OptionalArcParkingRwLockKeyPathChain<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>,
) -> OptionalArcParkingRwLockKeyPathChain<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>,
) -> OptionalArcParkingRwLockOptionalKeyPathChain<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>,
) -> OptionalArcParkingRwLockOptionalKeyPathChain<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 OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> !RefUnwindSafe for OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Send for OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Sync for OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Unpin for OptionalArcParkingRwLockKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> !UnwindSafe for OptionalArcParkingRwLockKeyPathChain<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