Enum rsonpath_lib::query::JsonPathQueryNode
source · pub enum JsonPathQueryNode {
Root(Option<Box<JsonPathQueryNode>>),
Child(Label, 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 (‘.
’ token).
Descendant(Label, Option<Box<JsonPathQueryNode>>)
Represents recursive descent (‘..
’ token).
Implementations
Trait Implementations
sourceimpl Debug for JsonPathQueryNode
impl Debug for JsonPathQueryNode
sourceimpl Display for JsonPathQueryNode
impl Display for JsonPathQueryNode
sourceimpl JsonPathQueryNodeType for JsonPathQueryNode
impl JsonPathQueryNodeType for JsonPathQueryNode
sourcefn is_root(&self) -> bool
fn is_root(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::Root
.sourcefn is_descendant(&self) -> bool
fn is_descendant(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::Descendant
.sourcefn is_child(&self) -> bool
fn is_child(&self) -> bool
Returns
true
iff the type is JsonPathQueryNode::Child
.sourcefn 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
. Read moreAuto Trait Implementations
impl RefUnwindSafe for JsonPathQueryNode
impl !Send for JsonPathQueryNode
impl !Sync for JsonPathQueryNode
impl Unpin for JsonPathQueryNode
impl UnwindSafe for JsonPathQueryNode
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