Struct json_pointer::JsonPointer
[−]
[src]
pub struct JsonPointer<S: AsRef<str>, C: AsRef<[S]>> { /* fields omitted */ }
A JSON Pointer.
Create a new JSON pointer with JsonPointer::new
, or parse one from a
string with str::parse()
.
Methods
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointer<S, C>
[src]
fn new(ref_toks: C) -> JsonPointer<S, C>
Creates a new JsonPointer from the given reference tokens.
fn get<'json>(&self, val: &'json Value) -> Result<&'json Value, Error>
Attempts to get a reference to a value from the given JSON value, returning an error if it can't be found.
fn get_mut<'json>(
&self,
val: &'json mut Value
) -> Result<&'json mut Value, Error>
&self,
val: &'json mut Value
) -> Result<&'json mut Value, Error>
Attempts to get a mutable reference to a value from the given JSON value, returning an error if it can't be found.
Trait Implementations
impl<S: AsRef<str>, C: AsRef<[S]>> Display for JsonPointer<S, C>
[src]
fn fmt(&self, fmt: &mut Formatter) -> FmtResult
Formats the value using the given formatter. Read more
impl<S: AsRef<str>> FromIterator<S> for JsonPointer<S, Vec<S>>
[src]
fn from_iter<T: IntoIterator<Item = S>>(iter: T) -> Self
Creates a value from an iterator. Read more