pub struct OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r Arc<Mutex<RawMutex, InnerValue>>>,
G: for<'r> Fn(&'r mut InnerValue) -> Option<&'r mut SubValue>,{ /* private fields */ }Expand description
A composed writable optional keypath chain from optional keypath through Arc<parking_lot::Mutex
Implementations§
Source§impl<Root, InnerValue, SubValue, F, G> OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r Arc<Mutex<RawMutex, InnerValue>>>,
G: for<'r> Fn(&'r mut InnerValue) -> Option<&'r mut SubValue>,
impl<Root, InnerValue, SubValue, F, G> OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>where
F: for<'r> Fn(&'r Root) -> Option<&'r Arc<Mutex<RawMutex, InnerValue>>>,
G: for<'r> Fn(&'r mut InnerValue) -> Option<&'r mut SubValue>,
Sourcepub fn get_mut<Callback, R>(
self,
container: &Root,
callback: Callback,
) -> Option<R>where
Callback: FnOnce(&mut SubValue) -> R,
pub fn get_mut<Callback, R>(
self,
container: &Root,
callback: Callback,
) -> Option<R>where
Callback: FnOnce(&mut SubValue) -> R,
Apply the composed keypath chain to a container with mutable access (if value exists)
Sourcepub fn then<NextValue, H>(
self,
next: WritableKeyPath<SubValue, NextValue, H>,
) -> OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r mut InnerValue) + 'static>where
H: for<'r> Fn(&'r mut SubValue) -> &'r mut NextValue + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
pub fn then<NextValue, H>(
self,
next: WritableKeyPath<SubValue, NextValue, H>,
) -> OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r mut InnerValue) + 'static>where
H: for<'r> Fn(&'r mut SubValue) -> &'r mut NextValue + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
Chain with another writable keypath through another level
Sourcepub fn chain_optional<NextValue, H>(
self,
next: WritableOptionalKeyPath<SubValue, NextValue, H>,
) -> OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r mut InnerValue) + 'static>where
H: for<'r> Fn(&'r mut SubValue) -> Option<&'r mut NextValue> + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
pub fn chain_optional<NextValue, H>(
self,
next: WritableOptionalKeyPath<SubValue, NextValue, H>,
) -> OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, NextValue, F, impl for<'r> Fn(&'r mut InnerValue) + 'static>where
H: for<'r> Fn(&'r mut SubValue) -> Option<&'r mut NextValue> + 'static,
G: 'static,
InnerValue: 'static,
SubValue: 'static,
NextValue: 'static,
Chain with an optional writable keypath through another level
Auto Trait Implementations§
impl<Root, InnerValue, SubValue, F, G> Freeze for OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> !RefUnwindSafe for OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Send for OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Sync for OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> Unpin for OptionalArcParkingMutexWritableOptionalKeyPathChain<Root, InnerValue, SubValue, F, G>
impl<Root, InnerValue, SubValue, F, G> !UnwindSafe for OptionalArcParkingMutexWritableOptionalKeyPathChain<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