pub struct DataPath { /* private fields */ }Expand description
A path into the data a rule is evaluated against, one segment per object key or array index, from the root.
A read of a path observes the whole value there, everything under it included. The empty path is the whole data context.
Segments are kept apart rather than joined, because var splits its
path on dots and val does not: {"var": "a.b"} reads ["a", "b"]
while {"val": "a.b"} reads the single key ["a.b"]. The
Display form joins them with dots, so it is only
unambiguous for segments that contain none.
Implementations§
Trait Implementations§
impl Eq for DataPath
Source§impl Ord for DataPath
impl Ord for DataPath
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DataPath
impl PartialOrd for DataPath
impl StructuralPartialEq for DataPath
Auto Trait Implementations§
impl Freeze for DataPath
impl RefUnwindSafe for DataPath
impl Send for DataPath
impl Sync for DataPath
impl Unpin for DataPath
impl UnsafeUnpin for DataPath
impl UnwindSafe for DataPath
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