pub struct KeyPathFrom<Root> {
pub path: Vec<KeyPathElement>,
/* private fields */
}Expand description
Partially erased keypath, retaining information about the root type, but erasing the value type
Fields§
§path: Vec<KeyPathElement>Implementations§
Source§impl<Root> KeyPathFrom<Root>
impl<Root> KeyPathFrom<Root>
pub fn prepending<Base>( &self, keypath: &KeyPath<Base, Root>, ) -> KeyPathFrom<Base>
Sourcepub fn is_subpath_of(&self, other: &Self) -> bool
pub fn is_subpath_of(&self, other: &Self) -> bool
Returns whether this subpath is fully contained within other.
In other words, whether other references a field/index/variant within
self.
Returns false if both paths are equal.
Trait Implementations§
Source§impl<Root: Clone> Clone for KeyPathFrom<Root>
impl<Root: Clone> Clone for KeyPathFrom<Root>
Source§fn clone(&self) -> KeyPathFrom<Root>
fn clone(&self) -> KeyPathFrom<Root>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Root: Debug> Debug for KeyPathFrom<Root>
impl<Root: Debug> Debug for KeyPathFrom<Root>
Source§impl<T> Display for KeyPathFrom<T>
impl<T> Display for KeyPathFrom<T>
Source§impl<Root, T> From<KeyPath<Root, T>> for KeyPathFrom<Root>
impl<Root, T> From<KeyPath<Root, T>> for KeyPathFrom<Root>
Source§impl<Root, T> PartialEq<KeyPath<Root, T>> for KeyPathFrom<Root>
impl<Root, T> PartialEq<KeyPath<Root, T>> for KeyPathFrom<Root>
Source§impl<Root: PartialEq> PartialEq for KeyPathFrom<Root>
impl<Root: PartialEq> PartialEq for KeyPathFrom<Root>
Source§impl<Root> Serialize for KeyPathFrom<Root>
impl<Root> Serialize for KeyPathFrom<Root>
impl<Root> StructuralPartialEq for KeyPathFrom<Root>
Auto Trait Implementations§
impl<Root> Freeze for KeyPathFrom<Root>
impl<Root> RefUnwindSafe for KeyPathFrom<Root>where
Root: RefUnwindSafe,
impl<Root> Send for KeyPathFrom<Root>where
Root: Send,
impl<Root> Sync for KeyPathFrom<Root>where
Root: Sync,
impl<Root> Unpin for KeyPathFrom<Root>where
Root: Unpin,
impl<Root> UnwindSafe for KeyPathFrom<Root>where
Root: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)