Struct jsonpath_rust::JsonPathFinder
source · [−]pub struct JsonPathFinder { /* private fields */ }
Expand description
The base structure stitching the json instance and jsonpath instance
Implementations
sourceimpl JsonPathFinder
impl JsonPathFinder
sourcepub fn new(json: Box<Value>, path: Box<JsonPathInst>) -> Self
pub fn new(json: Box<Value>, path: Box<JsonPathInst>) -> Self
creates a new instance of JsonPathFinder
sourcepub fn set_path(&mut self, path: Box<JsonPathInst>)
pub fn set_path(&mut self, path: Box<JsonPathInst>)
updates a path with a new one
sourcepub fn set_json_str(&mut self, json: &str) -> Result<(), String>
pub fn set_json_str(&mut self, json: &str) -> Result<(), String>
updates a json from string and therefore can be some parsing errors
sourcepub fn set_path_str(&mut self, path: &str) -> Result<(), String>
pub fn set_path_str(&mut self, path: &str) -> Result<(), String>
updates a path from string and therefore can be some parsing errors
sourcepub fn from_str(json: &str, path: &str) -> Result<Self, String>
pub fn from_str(json: &str, path: &str) -> Result<Self, String>
create a new instance from string and therefore can be some parsing errors
sourcepub fn instance(&self) -> Box<dyn Path<'_, Data = Value> + '_>
pub fn instance(&self) -> Box<dyn Path<'_, Data = Value> + '_>
creates an instance to find a json slice from the json
Auto Trait Implementations
impl RefUnwindSafe for JsonPathFinder
impl Send for JsonPathFinder
impl Sync for JsonPathFinder
impl Unpin for JsonPathFinder
impl UnwindSafe for JsonPathFinder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more