[−][src]Struct json_pointer::JsonPointer
A JSON Pointer.
Create a new JSON pointer with JsonPointer::new
, or parse one from a
string with str::parse()
.
Implementations
impl<S: AsRef<str>, C: AsRef<[S]>> JsonPointer<S, C>
[src]
pub fn new(ref_toks: C) -> JsonPointer<S, C>
[src]
Creates a new JsonPointer from the given reference tokens.
pub fn get<'json>(&self, val: &'json Value) -> Result<&'json Value, IndexError>
[src]
Attempts to get a reference to a value from the given JSON value, returning an error if it can't be found.
pub fn get_mut<'json>(
&self,
val: &'json mut Value
) -> Result<&'json mut Value, IndexError>
[src]
&self,
val: &'json mut Value
) -> Result<&'json mut Value, IndexError>
Attempts to get a mutable reference to a value from the given JSON value, returning an error if it can't be found.
pub fn get_owned(&self, val: Value) -> Result<Value, IndexError>
[src]
Attempts to get an owned value from the given JSON value, returning an error if it can't be found.
pub fn uri_fragment(&self) -> String
[src]
Converts a JSON pointer to a string in URI Fragment Identifier
Representation, including the leading #
.
impl<S: AsRef<str>> JsonPointer<S, Vec<S>>
[src]
pub fn push(&mut self, component: S)
[src]
Adds a component to the JSON pointer.
pub fn pop(&mut self) -> Option<S>
[src]
Removes and returns the last component from the JSON pointer.
Trait Implementations
impl<S: Clone + AsRef<str>, C: Clone + AsRef<[S]>> Clone for JsonPointer<S, C>
[src]
fn clone(&self) -> JsonPointer<S, C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Debug + AsRef<str>, C: Debug + AsRef<[S]>> Debug for JsonPointer<S, C>
[src]
impl<S: AsRef<str>, C: AsRef<[S]>> Display for JsonPointer<S, C>
[src]
impl<S: Eq + AsRef<str>, C: Eq + AsRef<[S]>> Eq for JsonPointer<S, C>
[src]
impl FromStr for JsonPointer<String, Vec<String>>
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl<'a, S: AsRef<str>, C: AsRef<[S]>> Index<&'a JsonPointer<S, C>> for Value
[src]
type Output = Value
The returned type after indexing.
fn index(&self, ptr: &'a JsonPointer<S, C>) -> &Value
[src]
impl<'a, S: AsRef<str>, C: AsRef<[S]>> IndexMut<&'a JsonPointer<S, C>> for Value
[src]
fn index_mut(&mut self, ptr: &'a JsonPointer<S, C>) -> &mut Value
[src]
impl<S: PartialEq + AsRef<str>, C: PartialEq + AsRef<[S]>> PartialEq<JsonPointer<S, C>> for JsonPointer<S, C>
[src]
fn eq(&self, other: &JsonPointer<S, C>) -> bool
[src]
fn ne(&self, other: &JsonPointer<S, C>) -> bool
[src]
impl<S: AsRef<str>, C: AsRef<[S]>> StructuralEq for JsonPointer<S, C>
[src]
impl<S: AsRef<str>, C: AsRef<[S]>> StructuralPartialEq for JsonPointer<S, C>
[src]
Auto Trait Implementations
impl<S, C> RefUnwindSafe for JsonPointer<S, C> where
C: RefUnwindSafe,
S: RefUnwindSafe,
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, C> Send for JsonPointer<S, C> where
C: Send,
S: Send,
C: Send,
S: Send,
impl<S, C> Sync for JsonPointer<S, C> where
C: Sync,
S: Sync,
C: Sync,
S: Sync,
impl<S, C> Unpin for JsonPointer<S, C> where
C: Unpin,
S: Unpin,
C: Unpin,
S: Unpin,
impl<S, C> UnwindSafe for JsonPointer<S, C> where
C: UnwindSafe,
S: UnwindSafe,
C: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,