pub enum ArithmeticExpr {
Literal(i64),
Reference(ArithmeticTarget),
UnaryOp(UnaryOperator, Box<ArithmeticExpr>),
BinaryOp(BinaryOperator, Box<ArithmeticExpr>, Box<ArithmeticExpr>),
Conditional(Box<ArithmeticExpr>, Box<ArithmeticExpr>, Box<ArithmeticExpr>),
Assignment(ArithmeticTarget, Box<ArithmeticExpr>),
BinaryAssignment(BinaryOperator, ArithmeticTarget, Box<ArithmeticExpr>),
UnaryAssignment(UnaryAssignmentOperator, ArithmeticTarget),
}
Expand description
An arithmetic expression.
Variants§
Literal(i64)
A literal integer value.
Reference(ArithmeticTarget)
A dereference of a variable or array element.
UnaryOp(UnaryOperator, Box<ArithmeticExpr>)
A unary operation on an the result of a given nested expression.
BinaryOp(BinaryOperator, Box<ArithmeticExpr>, Box<ArithmeticExpr>)
A binary operation on two nested expressions.
Conditional(Box<ArithmeticExpr>, Box<ArithmeticExpr>, Box<ArithmeticExpr>)
A ternary conditional expression.
Assignment(ArithmeticTarget, Box<ArithmeticExpr>)
An assignment operation.
BinaryAssignment(BinaryOperator, ArithmeticTarget, Box<ArithmeticExpr>)
A binary assignment operation.
UnaryAssignment(UnaryAssignmentOperator, ArithmeticTarget)
A unary assignment operation.
Trait Implementations§
source§impl Clone for ArithmeticExpr
impl Clone for ArithmeticExpr
source§fn clone(&self) -> ArithmeticExpr
fn clone(&self) -> ArithmeticExpr
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ArithmeticExpr
impl Debug for ArithmeticExpr
Auto Trait Implementations§
impl Freeze for ArithmeticExpr
impl RefUnwindSafe for ArithmeticExpr
impl Send for ArithmeticExpr
impl Sync for ArithmeticExpr
impl Unpin for ArithmeticExpr
impl UnwindSafe for ArithmeticExpr
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)