pub enum BinaryOperator {
Show 20 variants
Power,
Multiply,
Divide,
Modulo,
Comma,
Add,
Subtract,
ShiftLeft,
ShiftRight,
LessThan,
LessThanOrEqualTo,
GreaterThan,
GreaterThanOrEqualTo,
Equals,
NotEquals,
BitwiseAnd,
BitwiseXor,
BitwiseOr,
LogicalAnd,
LogicalOr,
}
Expand description
A binary arithmetic operator.
Variants§
Power
Exponentiation (e.g., x ** y
).
Multiply
Multiplication (e.g., x * y
).
Divide
Division (e.g., x / y
).
Modulo
Modulo (e.g., x % y
).
Comma
Comma (e.g., x, y
).
Add
Addition (e.g., x + y
).
Subtract
Subtraction (e.g., x - y
).
ShiftLeft
Bitwise left shift (e.g., x << y
).
ShiftRight
Bitwise right shift (e.g., x >> y
).
LessThan
Less than (e.g., x < y
).
LessThanOrEqualTo
Less than or equal to (e.g., x <= y
).
GreaterThan
Greater than (e.g., x > y
).
GreaterThanOrEqualTo
Greater than or equal to (e.g., x >= y
).
Equals
Equals (e.g., x == y
).
NotEquals
Not equals (e.g., x != y
).
BitwiseAnd
Bitwise AND (e.g., x & y
).
BitwiseXor
Bitwise exclusive OR (xor) (e.g., x ^ y
).
BitwiseOr
Bitwise OR (e.g., x | y
).
LogicalAnd
Logical AND (e.g., x && y
).
LogicalOr
Logical OR (e.g., x || y
).
Trait Implementations§
Source§impl Clone for BinaryOperator
impl Clone for BinaryOperator
Source§fn clone(&self) -> BinaryOperator
fn clone(&self) -> BinaryOperator
Returns a duplicate of the value. Read more
1.0.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 BinaryOperator
impl Debug for BinaryOperator
Source§impl Display for BinaryOperator
impl Display for BinaryOperator
impl Copy for BinaryOperator
Auto Trait Implementations§
impl Freeze for BinaryOperator
impl RefUnwindSafe for BinaryOperator
impl Send for BinaryOperator
impl Sync for BinaryOperator
impl Unpin for BinaryOperator
impl UnwindSafe for BinaryOperator
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