pub enum Segment {
Key(String),
Index(usize),
}Expand description
One step of a path: an object key or an array index.
Public because a path’s steps are what a caller judging a path against a declared JSON Schema has to walk; the segments are read-only data either way, and no evaluation rule reads them through this type.
Variants§
Key(String)
An object key: the score in review.score.
Index(usize)
An array index: the 0 in results.0.score.
Trait Implementations§
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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