Struct json_pointer_simd::JsonPointer
source · pub struct JsonPointer<S: AsRef<str>, C: AsRef<[S]>> { /* private fields */ }
Expand description
A JSON Pointer.
Create a new JSON pointer with JsonPointer::new
, or parse one from a
string with str::parse()
.
Implementations§
source§impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointer<S, C>
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointer<S, C>
sourcepub fn new(ref_toks: C) -> JsonPointer<S, C>
pub fn new(ref_toks: C) -> JsonPointer<S, C>
Creates a new JsonPointer from the given reference tokens.
sourcepub fn uri_fragment(&self) -> String
pub fn uri_fragment(&self) -> String
Converts a JSON pointer to a string in URI Fragment Identifier
Representation, including the leading #
.
Trait Implementations§
source§impl<S: Clone + AsRef<str>, C: Clone + AsRef<[S]>> Clone for JsonPointer<S, C>
impl<S: Clone + AsRef<str>, C: Clone + AsRef<[S]>> Clone for JsonPointer<S, C>
source§fn clone(&self) -> JsonPointer<S, C>
fn clone(&self) -> JsonPointer<S, C>
Returns a copy 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<'value, S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value<'value>> for JsonPointer<S, C>
impl<'value, S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value<'value>> for JsonPointer<S, C>
Implement getting for SIMD JSON Borrowed values
source§fn get<'json>(
&self,
val: &'json Value<'value>
) -> Result<&'json Value<'value>, IndexError>
fn get<'json>( &self, val: &'json Value<'value> ) -> Result<&'json Value<'value>, IndexError>
Attempts to get a reference to a value from the given JSON value, returning an error if it can’t be found.
source§impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>
Implement getting for SIMD JSON Owned values
source§fn get<'json>(&self, val: &'json Value) -> Result<&'json Value, IndexError>
fn get<'json>(&self, val: &'json Value) -> Result<&'json Value, IndexError>
Attempts to get a reference to a value from the given JSON value, returning an error if it can’t be found.
source§impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointerTarget<Value> for JsonPointer<S, C>
Implement getting for SIMD JSON Owned values
source§fn get<'json>(&self, val: &'json Value) -> Result<&'json Value, IndexError>
fn get<'json>(&self, val: &'json Value) -> Result<&'json Value, IndexError>
Attempts to get a reference to a value from the given JSON value, returning an error if it can’t be found.
source§impl<S: PartialEq + AsRef<str>, C: PartialEq + AsRef<[S]>> PartialEq for JsonPointer<S, C>
impl<S: PartialEq + AsRef<str>, C: PartialEq + AsRef<[S]>> PartialEq for JsonPointer<S, C>
source§fn eq(&self, other: &JsonPointer<S, C>) -> bool
fn eq(&self, other: &JsonPointer<S, C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<S: Eq + AsRef<str>, C: Eq + AsRef<[S]>> Eq for JsonPointer<S, C>
impl<S: AsRef<str>, C: AsRef<[S]>> StructuralEq for JsonPointer<S, C>
impl<S: AsRef<str>, C: AsRef<[S]>> StructuralPartialEq for JsonPointer<S, C>
Auto Trait Implementations§
impl<S, C> RefUnwindSafe for JsonPointer<S, C>where
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, C> Send for JsonPointer<S, C>
impl<S, C> Sync for JsonPointer<S, C>
impl<S, C> Unpin for JsonPointer<S, C>
impl<S, C> UnwindSafe for JsonPointer<S, C>where
C: UnwindSafe,
S: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more