Trait json_pointer_simd::JsonPointerTarget
source · 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§
sourcefn get<'json>(&self, val: &'json V) -> Result<&'json V, IndexError>
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.
sourcefn get_mut<'json>(&self, val: &'json mut V) -> Result<&'json mut V, IndexError>
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.
sourcefn get_owned(&self, val: V) -> Result<V, IndexError>
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§
impl<'value, S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value<'value>> for JsonPointer<S, C>
Implement getting for SIMD JSON Borrowed values
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>
Implement getting for SIMD JSON Owned values
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>
Implement getting for SIMD JSON Owned values