pub struct KeyPathsChain<T> { /* private fields */ }Expand description
KeyPaths chain for composable operations
Implementations§
Source§impl<T> KeyPathsChain<T>
impl<T> KeyPathsChain<T>
Sourcepub fn filter_by_keypath<V, F>(
self,
keypath: KeyPaths<T, V>,
predicate: F,
) -> Self
pub fn filter_by_keypath<V, F>( self, keypath: KeyPaths<T, V>, predicate: F, ) -> Self
Filter by keypath predicate
Sourcepub fn map_keypath<V, F, R>(
self,
keypath: KeyPaths<T, V>,
f: F,
) -> KeyPathsChain<R>
pub fn map_keypath<V, F, R>( self, keypath: KeyPaths<T, V>, f: F, ) -> KeyPathsChain<R>
Map over keypath values
Sourcepub fn fold_keypath<V, F, B>(
self,
keypath: KeyPaths<T, V>,
init: B,
f: F,
) -> KeyPathResult<B>
pub fn fold_keypath<V, F, B>( self, keypath: KeyPaths<T, V>, init: B, f: F, ) -> KeyPathResult<B>
Fold over keypath values
Sourcepub fn collect<B: FromIterator<T>>(self) -> B
pub fn collect<B: FromIterator<T>>(self) -> B
Collect into a vector
Auto Trait Implementations§
impl<T> Freeze for KeyPathsChain<T>
impl<T> RefUnwindSafe for KeyPathsChain<T>where
T: RefUnwindSafe,
impl<T> Send for KeyPathsChain<T>where
T: Send,
impl<T> Sync for KeyPathsChain<T>where
T: Sync,
impl<T> Unpin for KeyPathsChain<T>where
T: Unpin,
impl<T> UnwindSafe for KeyPathsChain<T>where
T: 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
Source§impl<T> KeyPathsOperable for T
impl<T> KeyPathsOperable for T
Source§fn get_at_keypath<'a, V>(
&'a self,
keypath: &'a KeyPaths<Self, V>,
) -> KeyPathResult<&'a V>
fn get_at_keypath<'a, V>( &'a self, keypath: &'a KeyPaths<Self, V>, ) -> KeyPathResult<&'a V>
Get a value at a keypath
Source§fn set_at_keypath<V>(
&mut self,
_keypath: KeyPaths<Self, V>,
_value: V,
) -> KeyPathResult<()>
fn set_at_keypath<V>( &mut self, _keypath: KeyPaths<Self, V>, _value: V, ) -> KeyPathResult<()>
Set a value at a keypath (if the keypath supports mutation)