Struct jsonpath_plus::idx::IdxPath
source · [−]pub struct IdxPath(_);
Expand description
A shortest-path set of indices on a JSON object
Implementations
sourceimpl IdxPath
impl IdxPath
sourcepub fn resolve_on<'a>(
&self,
value: &'a Value
) -> Result<&'a Value, ResolveError>
pub fn resolve_on<'a>(
&self,
value: &'a Value
) -> Result<&'a Value, ResolveError>
Resolve this path on a value, returning a reference to the result or an error indicating why the path couldn’t be resolved
Errors
- If the path cannot be resolved
sourcepub fn resolve_on_mut<'a>(
&self,
value: &'a mut Value
) -> Result<&'a mut Value, ResolveError>
pub fn resolve_on_mut<'a>(
&self,
value: &'a mut Value
) -> Result<&'a mut Value, ResolveError>
Resolve this path on a value, returning a mutable reference to the result or an error indicating why the path couldn’t be resolved
Errors
- If the path cannot be resolved
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IdxPath
impl Send for IdxPath
impl Sync for IdxPath
impl Unpin for IdxPath
impl UnwindSafe for IdxPath
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more