pub enum ExprKind {
Literal(Literal),
Identifier(String),
Call {
callee: Box<Expr>,
arguments: Vec<Expr>,
},
FieldAccess {
base: Box<Expr>,
field: String,
},
Unary {
op: UnaryOp,
expr: Box<Expr>,
},
Binary {
op: BinaryOp,
left: Box<Expr>,
right: Box<Expr>,
},
Conditional {
condition: Box<Expr>,
when_true: Box<Expr>,
when_false: Box<Expr>,
},
Assignment {
op: AssignmentOp,
left: Box<Expr>,
right: Box<Expr>,
},
}Expand description
One expression shape.
Variants§
Literal(Literal)
One literal constant.
Identifier(String)
One variable or named constant reference.
Call
One function call or action invocation.
FieldAccess
One structure field access.
Fields
Unary
One unary or postfix operator.
Binary
One binary operator.
Fields
Conditional
One conditional expression.
Fields
Assignment
One assignment expression.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ExprKind
impl<'de> Deserialize<'de> for ExprKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnsafeUnpin for ExprKind
impl UnwindSafe for ExprKind
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