Struct rsonpath::query::JsonString
source · pub struct JsonString { /* private fields */ }
Expand description
String to search for in a JSON document, conforming to the RFC7159, section 7
Represents the bytes defining a label/key in a JSON object that can be matched against when executing a query.
Examples
let needle = JsonString::new("needle");
assert_eq!(needle.bytes(), "needle".as_bytes());
assert_eq!(needle.bytes_with_quotes(), "\"needle\"".as_bytes());
Implementations§
Trait Implementations§
source§impl<'a> Arbitrary<'a> for JsonString
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for JsonString
Available on crate feature
arbitrary
only.source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for JsonString
impl Clone for JsonString
source§fn clone(&self) -> JsonString
fn clone(&self) -> JsonString
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 Debug for JsonString
impl Debug for JsonString
source§impl Display for JsonString
impl Display for JsonString
source§impl<'q> From<&'q JsonString> for TransitionLabel<'q>
impl<'q> From<&'q JsonString> for TransitionLabel<'q>
source§fn from(member_name: &'q JsonString) -> Self
fn from(member_name: &'q JsonString) -> Self
Converts to this type from the input type.
source§impl Hash for JsonString
impl Hash for JsonString
source§impl PartialEq<&[u8]> for JsonString
impl PartialEq<&[u8]> for JsonString
source§impl PartialEq<[u8]> for JsonString
impl PartialEq<[u8]> for JsonString
source§impl PartialEq<JsonString> for &[u8]
impl PartialEq<JsonString> for &[u8]
source§fn eq(&self, other: &JsonString) -> bool
fn eq(&self, other: &JsonString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<JsonString> for [u8]
impl PartialEq<JsonString> for [u8]
source§fn eq(&self, other: &JsonString) -> bool
fn eq(&self, other: &JsonString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for JsonString
impl PartialEq for JsonString
impl Eq for JsonString
Auto Trait Implementations§
impl RefUnwindSafe for JsonString
impl Send for JsonString
impl Sync for JsonString
impl Unpin for JsonString
impl UnwindSafe for JsonString
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