pub trait JsonPointerTarget<V> {
    // Required methods
    fn get<'json>(&self, val: &'json V) -> Result<&'json V, IndexError>;
    fn get_mut<'json>(
        &self,
        val: &'json mut V
    ) -> Result<&'json mut V, IndexError>;
    fn get_owned(&self, val: V) -> Result<V, IndexError>;
}
Expand description

The trait that provides access to the data referenced by the JsonPointer. This trait is implemented for both [OwnedValue] and [BorrowedValue].

Required Methods§

source

fn get<'json>(&self, val: &'json V) -> Result<&'json V, IndexError>

Attempts to get a reference to a value from the given JSON value, returning an error if it can’t be found.

source

fn get_mut<'json>(&self, val: &'json mut V) -> Result<&'json mut V, IndexError>

Attempts to get a mutable reference to a value from the given JSON value, returning an error if it can’t be found.

source

fn get_owned(&self, val: V) -> Result<V, IndexError>

Attempts to get an owned value from the given JSON value, returning an error if it can’t be found.

Implementors§

source§

impl<'value, S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value<'value>> for JsonPointer<S, C>

Implement getting for SIMD JSON Borrowed values

source§

impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>

Implement getting for SIMD JSON Owned values

source§

impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>

Implement getting for SIMD JSON Owned values