Struct rsonpath_lib::query::JsonPathQuery
source · pub struct JsonPathQuery { /* private fields */ }
Expand description
JSONPath query structure represented by the root link of the
JsonPathQueryNode
list.
Implementations
sourceimpl JsonPathQuery
impl JsonPathQuery
sourcepub fn root(&self) -> &JsonPathQueryNode
pub fn root(&self) -> &JsonPathQueryNode
Retrieve reference to the root node.
It is guaranteed that the root is the JsonPathQueryNode::Root
variant and always exists.
sourcepub fn parse(query_string: &str) -> Result<Self, QueryError>
pub fn parse(query_string: &str) -> Result<Self, QueryError>
Parse a query string into a JsonPathQuery
.
sourcepub fn new(node: Box<JsonPathQueryNode>) -> Self
pub fn new(node: Box<JsonPathQueryNode>) -> Self
Create a query from a root node.
If node is not the JsonPathQueryNode::Root
variant it will be
automatically wrapped into a JsonPathQueryNode::Root
node.
Trait Implementations
sourceimpl Debug for JsonPathQuery
impl Debug for JsonPathQuery
Auto Trait Implementations
impl RefUnwindSafe for JsonPathQuery
impl !Send for JsonPathQuery
impl !Sync for JsonPathQuery
impl Unpin for JsonPathQuery
impl UnwindSafe for JsonPathQuery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more