pub struct JsonPath { /* private fields */ }
Expand description
JSON Path for addressing specific nodes in the JSON structure
Implementations§
Source§impl JsonPath
impl JsonPath
Sourcepub fn append_key(&self, key: &str) -> Self
pub fn append_key(&self, key: &str) -> Self
Append key segment
Sourcepub fn append_index(&self, index: usize) -> Self
pub fn append_index(&self, index: usize) -> Self
Append index segment
Sourcepub fn segments(&self) -> &[PathSegment]
pub fn segments(&self) -> &[PathSegment]
Get segments (read-only)
Sourcepub fn from_segments(segments: Vec<PathSegment>) -> Self
pub fn from_segments(segments: Vec<PathSegment>) -> Self
Create JsonPath from segments (for testing)
Sourcepub fn to_json_pointer(&self) -> String
pub fn to_json_pointer(&self) -> String
Convert to JSON Pointer string format
Trait Implementations§
impl StructuralPartialEq for JsonPath
Auto Trait Implementations§
impl Freeze for JsonPath
impl RefUnwindSafe for JsonPath
impl Send for JsonPath
impl Sync for JsonPath
impl Unpin for JsonPath
impl UnwindSafe for JsonPath
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