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>>),
}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).
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_child(&self) -> bool
fn is_child(&self) -> bool
Returns
true iff the type is JsonPathQueryNode::Child.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 ==.