pub enum Node {
Ternary {
condition: Box<Node>,
true_value: Box<Node>,
false_value: Box<Node>,
},
Binary {
operator: String,
left: Box<Node>,
right: Box<Node>,
},
Unary {
operator: String,
operand: Box<Node>,
},
In {
negated: bool,
value: Box<Node>,
list: Vec<Node>,
},
Path {
relative: bool,
levels_up: i64,
segments: Vec<PathSegment>,
},
Literal(LiteralValue),
Group(Box<Node>),
}Expand description
An expression AST node (expressions.md §4).
Variants§
Ternary
condition ? trueValue : falseValue (right-associative).
Fields
Binary
Logical (&& ||) or comparison (== != > >= < <=) operation.
Fields
Unary
! operand.
In
value [not] in list membership test.
Fields
Path
A path reference.
Fields
§
segments: Vec<PathSegment>Ordered path segments.
Literal(LiteralValue)
A literal value.
Group(Box<Node>)
A parenthesized group wrapping an inner expression.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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