pub struct StringPattern(/* private fields */);
Expand description
String pattern coming from a JSONPath query that can be matched against strings in a JSON.
Right now the only pattern is matching against a given JsonString
.
Implementations§
Source§impl StringPattern
impl StringPattern
Sourcepub fn quoted(&self) -> &[u8] ⓘ
pub fn quoted(&self) -> &[u8] ⓘ
Get the underlying JsonString
as bytes, including the delimiting double quote symbols.
Sourcepub fn unquoted(&self) -> &[u8] ⓘ
pub fn unquoted(&self) -> &[u8] ⓘ
Get the underlying JsonString
as bytes, without the delimiting quotes.
Sourcepub fn new(string: &JsonString) -> Self
pub fn new(string: &JsonString) -> Self
Create a new pattern from a given JsonString
.
Trait Implementations§
Source§impl Clone for StringPattern
impl Clone for StringPattern
Source§fn clone(&self) -> StringPattern
fn clone(&self) -> StringPattern
Returns a duplicate 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 StringPattern
impl Debug for StringPattern
Source§impl<'de> Deserialize<'de> for StringPattern
impl<'de> Deserialize<'de> for StringPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&JsonString> for StringPattern
impl From<&JsonString> for StringPattern
Source§fn from(value: &JsonString) -> Self
fn from(value: &JsonString) -> Self
Converts to this type from the input type.
Source§impl From<JsonString> for StringPattern
impl From<JsonString> for StringPattern
Source§fn from(value: JsonString) -> Self
fn from(value: JsonString) -> Self
Converts to this type from the input type.
Source§impl Hash for StringPattern
impl Hash for StringPattern
Source§impl Ord for StringPattern
impl Ord for StringPattern
Source§impl PartialEq for StringPattern
impl PartialEq for StringPattern
Source§impl PartialOrd for StringPattern
impl PartialOrd for StringPattern
Source§impl Serialize for StringPattern
impl Serialize for StringPattern
impl Eq for StringPattern
Auto Trait Implementations§
impl Freeze for StringPattern
impl RefUnwindSafe for StringPattern
impl Send for StringPattern
impl Sync for StringPattern
impl Unpin for StringPattern
impl UnwindSafe for StringPattern
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