Enum rsonpath_lib::query::JsonPathQueryNode
source · pub enum JsonPathQueryNode {
Root(Option<Box<JsonPathQueryNode>>),
Child(Label, Option<Box<JsonPathQueryNode>>),
AnyChild(Option<Box<JsonPathQueryNode>>),
Descendant(Label, Option<Box<JsonPathQueryNode>>),
AnyDescendant(Option<Box<JsonPathQueryNode>>),
}
Expand description
Linked list structure of a JSONPath query.
Variants§
Root(Option<Box<JsonPathQueryNode>>)
The first link in the list representing the root ‘$
’ character.
Child(Label, Option<Box<JsonPathQueryNode>>)
Represents direct descendant with a label (‘.
’ token).
AnyChild(Option<Box<JsonPathQueryNode>>)
Represents direct descendant with a wildcard (‘.*
’ tokens).
Descendant(Label, Option<Box<JsonPathQueryNode>>)
Represents recursive descent (‘..
’ token).
AnyDescendant(Option<Box<JsonPathQueryNode>>)
Represents recursive descendant with a wildcard (‘..*
’ tokens).
Implementations§
Trait Implementations§
source§impl Debug for JsonPathQueryNode
impl Debug for JsonPathQueryNode
source§impl Display for JsonPathQueryNode
impl Display for JsonPathQueryNode
source§impl JsonPathQueryNodeType for JsonPathQueryNode
impl JsonPathQueryNodeType for JsonPathQueryNode
source§fn is_root(&self) -> bool
fn is_root(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::Root
.source§fn is_descendant(&self) -> bool
fn is_descendant(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::Descendant
.source§fn is_any_descendant(&self) -> bool
fn is_any_descendant(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::AnyDescendant
.source§fn is_child(&self) -> bool
fn is_child(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::Child
.source§fn is_any_child(&self) -> bool
fn is_any_child(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::AnyChild
.source§fn label(&self) -> Option<&Label>
fn label(&self) -> Option<&Label>
If the type is
JsonPathQueryNode::Descendant
or JsonPathQueryNode::Child
returns the label it represents; otherwise, None
.source§impl PartialEq<JsonPathQueryNode> for JsonPathQueryNode
impl PartialEq<JsonPathQueryNode> for JsonPathQueryNode
source§fn eq(&self, other: &JsonPathQueryNode) -> bool
fn eq(&self, other: &JsonPathQueryNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for JsonPathQueryNode
impl StructuralEq for JsonPathQueryNode
impl StructuralPartialEq for JsonPathQueryNode
Auto Trait Implementations§
impl RefUnwindSafe for JsonPathQueryNode
impl !Send for JsonPathQueryNode
impl !Sync for JsonPathQueryNode
impl Unpin for JsonPathQueryNode
impl UnwindSafe for JsonPathQueryNode
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