pub enum Expr {
Literal {
value: Literal,
span: Span,
},
Tr(Tr),
Path(PathExpr),
Variant(VariantExpr),
Unary {
op: UnaryOp,
expr: Box<Expr>,
span: Span,
},
Binary {
op: BinaryOp,
lhs: Box<Expr>,
rhs: Box<Expr>,
span: Span,
},
Query(Action),
If {
cond: Box<Expr>,
then: Box<Expr>,
otherwise: Box<Expr>,
span: Span,
},
}Expand description
Restricted expressions: literals, translations, typed bindings, enum values and a fixed set of operators. Arbitrary function calls do not exist in this grammar.
Variants§
Literal
Tr(Tr)
Path(PathExpr)
Variant(VariantExpr)
Unary
Binary
Query(Action)
client.query(args): a typed query binding. It is only written as
the query: property of Query; calls exist nowhere else.
If
if cond { a } else { b }: one of two values of the same type.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Send for Expr
impl !Sync for Expr
impl Freeze for Expr
impl RefUnwindSafe 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