Enum jsonpath_rust::JsonPathValue
source · pub enum JsonPathValue<'a, Data> {
Slice(&'a Data),
NewValue(Data),
NoValue,
}
Expand description
A result of json path Can be either a slice of initial data or a new generated value(like length of array)
Variants§
Slice(&'a Data)
The slice of the initial json data
NewValue(Data)
The new data that was generated from the input data (like length operator)
NoValue
The absent value that indicates the input data is not matched to the given json path (like the absent fields)
Implementations§
source§impl<'a, Data> JsonPathValue<'a, Data>
impl<'a, Data> JsonPathValue<'a, Data>
Trait Implementations§
source§impl<'a, Data: Clone> Clone for JsonPathValue<'a, Data>
impl<'a, Data: Clone> Clone for JsonPathValue<'a, Data>
source§fn clone(&self) -> JsonPathValue<'a, Data>
fn clone(&self) -> JsonPathValue<'a, Data>
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<'a, Data: Debug> Debug for JsonPathValue<'a, Data>
impl<'a, Data: Debug> Debug for JsonPathValue<'a, Data>
source§impl<'a, Data> From<&'a Data> for JsonPathValue<'a, Data>
impl<'a, Data> From<&'a Data> for JsonPathValue<'a, Data>
source§impl<'a, Data: PartialEq> PartialEq<JsonPathValue<'a, Data>> for JsonPathValue<'a, Data>
impl<'a, Data: PartialEq> PartialEq<JsonPathValue<'a, Data>> for JsonPathValue<'a, Data>
source§fn eq(&self, other: &JsonPathValue<'a, Data>) -> bool
fn eq(&self, other: &JsonPathValue<'a, Data>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.