pub struct JsonPointer { /* private fields */ }Implementations§
Source§impl JsonPointer
impl JsonPointer
pub fn new(path: &str) -> Result<Self, Diagnostic>
Sourcepub fn get_mut<'a>(
&self,
value: &'a mut Value,
) -> Result<&'a mut Value, Diagnostic>
pub fn get_mut<'a>( &self, value: &'a mut Value, ) -> Result<&'a mut Value, Diagnostic>
Traverse the JSON value following this pointer, returning a mutable reference.
Errors include rich context: the full path, which segment failed, the value
at that point, and suggestions for typos. See pointer_errors module for details.
pub fn set(&self, value: &mut Value, new_value: Value) -> Result<(), Diagnostic>
pub fn remove(&self, value: &mut Value) -> Result<Value, Diagnostic>
pub fn to_string(&self) -> String
Trait Implementations§
Source§impl Clone for JsonPointer
impl Clone for JsonPointer
Source§fn clone(&self) -> JsonPointer
fn clone(&self) -> JsonPointer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonPointer
impl Debug for JsonPointer
Source§impl PartialEq for JsonPointer
impl PartialEq for JsonPointer
impl StructuralPartialEq for JsonPointer
Auto Trait Implementations§
impl Freeze for JsonPointer
impl RefUnwindSafe for JsonPointer
impl Send for JsonPointer
impl Sync for JsonPointer
impl Unpin for JsonPointer
impl UnwindSafe for JsonPointer
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