pub trait JsonPointerTargetwhere
Self: Sized,{
// Required methods
fn get<'json, S: AsRef<str>, C: AsRef<[S]>>(
&'json self,
ptr: &JsonPointer<S, C>,
) -> Result<&'json Self, IndexError>;
fn get_mut<'json, S: AsRef<str>, C: AsRef<[S]>>(
&'json mut self,
ptr: &JsonPointer<S, C>,
) -> Result<&'json mut Self, IndexError>;
fn get_owned<S: AsRef<str>, C: AsRef<[S]>>(
self,
ptr: &JsonPointer<S, C>,
) -> Result<Self, IndexError>;
}
Expand description
The trait that provides access to the data referenced by the JsonPointer.
Required Methods§
Sourcefn get<'json, S: AsRef<str>, C: AsRef<[S]>>(
&'json self,
ptr: &JsonPointer<S, C>,
) -> Result<&'json Self, IndexError>
fn get<'json, S: AsRef<str>, C: AsRef<[S]>>( &'json self, ptr: &JsonPointer<S, C>, ) -> Result<&'json Self, IndexError>
Attempts to get a reference to a value from self, returning an error if it can’t be found.
Sourcefn get_mut<'json, S: AsRef<str>, C: AsRef<[S]>>(
&'json mut self,
ptr: &JsonPointer<S, C>,
) -> Result<&'json mut Self, IndexError>
fn get_mut<'json, S: AsRef<str>, C: AsRef<[S]>>( &'json mut self, ptr: &JsonPointer<S, C>, ) -> Result<&'json mut Self, IndexError>
Attempts to get a mutable reference to a value from self returning an error if it can’t be found.
Sourcefn get_owned<S: AsRef<str>, C: AsRef<[S]>>(
self,
ptr: &JsonPointer<S, C>,
) -> Result<Self, IndexError>
fn get_owned<S: AsRef<str>, C: AsRef<[S]>>( self, ptr: &JsonPointer<S, C>, ) -> Result<Self, IndexError>
Attempts to get an owned value from self, returning an error if it can’t be found.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl JsonPointerTarget for Value
Implement getting for SIMD JSON Owned values
impl JsonPointerTarget for Value
Implement getting for SIMD JSON Owned values
Source§fn get<'value, S: AsRef<str>, C: AsRef<[S]>>(
&'value self,
ptr: &JsonPointer<S, C>,
) -> Result<&'value Self, IndexError>
fn get<'value, S: AsRef<str>, C: AsRef<[S]>>( &'value self, ptr: &JsonPointer<S, C>, ) -> Result<&'value Self, 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<'value, S: AsRef<str>, C: AsRef<[S]>>(
&'value mut self,
ptr: &JsonPointer<S, C>,
) -> Result<&'value mut Self, IndexError>
fn get_mut<'value, S: AsRef<str>, C: AsRef<[S]>>( &'value mut self, ptr: &JsonPointer<S, C>, ) -> Result<&'value mut Self, 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<S: AsRef<str>, C: AsRef<[S]>>(
self,
ptr: &JsonPointer<S, C>,
) -> Result<Self, IndexError>
fn get_owned<S: AsRef<str>, C: AsRef<[S]>>( self, ptr: &JsonPointer<S, C>, ) -> Result<Self, IndexError>
Attempts to get an owned value from the given JSON value, returning an error if it can’t be found.
Source§impl JsonPointerTarget for Value
Implement getting for SIMD JSON Owned values
impl JsonPointerTarget for Value
Implement getting for SIMD JSON Owned values
Source§fn get<'value, S: AsRef<str>, C: AsRef<[S]>>(
&'value self,
ptr: &JsonPointer<S, C>,
) -> Result<&'value Self, IndexError>
fn get<'value, S: AsRef<str>, C: AsRef<[S]>>( &'value self, ptr: &JsonPointer<S, C>, ) -> Result<&'value Self, 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<'value, S: AsRef<str>, C: AsRef<[S]>>(
&'value mut self,
ptr: &JsonPointer<S, C>,
) -> Result<&'value mut Self, IndexError>
fn get_mut<'value, S: AsRef<str>, C: AsRef<[S]>>( &'value mut self, ptr: &JsonPointer<S, C>, ) -> Result<&'value mut Self, 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<'value, S: AsRef<str>, C: AsRef<[S]>>(
self,
ptr: &JsonPointer<S, C>,
) -> Result<Self, IndexError>
fn get_owned<'value, S: AsRef<str>, C: AsRef<[S]>>( self, ptr: &JsonPointer<S, C>, ) -> Result<Self, IndexError>
Attempts to get an owned value from the given JSON value, returning an error if it can’t be found.
Source§impl<'a> JsonPointerTarget for Value<'a>where
Self: Sized,
Implement getting for SIMD JSON Borrowed values
impl<'a> JsonPointerTarget for Value<'a>where
Self: Sized,
Implement getting for SIMD JSON Borrowed values