pub enum Expr {
Show 15 variants
Null,
Bool(bool),
Int(i64),
Float(f64),
String(String),
Array(Vec<Expr>),
Ident(String),
MemberAccess {
object: Box<Expr>,
property: String,
},
IndexAccess {
object: Box<Expr>,
index: Box<Expr>,
},
Filter {
expr: Box<Expr>,
filters: Vec<FilterApplication>,
},
Ternary {
condition: Box<Expr>,
consequent: Box<Expr>,
alternate: Box<Expr>,
},
Binary {
op: BinaryOp,
left: Box<Expr>,
right: Box<Expr>,
},
Unary {
op: UnaryOp,
operand: Box<Expr>,
},
Test {
expr: Box<Expr>,
negated: bool,
test_name: String,
},
Membership {
expr: Box<Expr>,
negated: bool,
collection: Box<Expr>,
},
}Expand description
A Gracile expression.
Variants§
Null
Bool(bool)
Int(i64)
Float(f64)
String(String)
Array(Vec<Expr>)
Ident(String)
MemberAccess
object.property
IndexAccess
object[index]
Filter
expr | filter1 | filter2(arg)
Ternary
cond ? then : else
Binary
Binary operators.
Unary
Unary operators.
Test
expr is [not] test_name
Membership
expr [not] in collection
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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