pub enum BinOp {
Show 18 variants
Add,
Sub,
Mul,
Div,
FloorDiv,
Mod,
Pow,
BitAnd,
BitOr,
BitXor,
Shl,
Shr,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
}Expand description
Binary operators.
Variants§
Add
Addition.
Sub
Subtraction.
Mul
Multiplication.
Div
Division.
FloorDiv
Floor division.
Mod
Modulo.
Pow
Power.
BitAnd
Bitwise AND.
BitOr
Bitwise OR.
BitXor
Bitwise XOR.
Shl
Left shift.
Shr
Right shift.
Eq
Equal.
Ne
Not equal.
Lt
Less than.
Le
Less than or equal.
Gt
Greater than.
Ge
Greater than or equal.
Implementations§
Source§impl BinOp
impl BinOp
Sourcepub fn is_comparison(&self) -> bool
pub fn is_comparison(&self) -> bool
Returns true if this operator produces a boolean result.
Sourcepub fn is_arithmetic(&self) -> bool
pub fn is_arithmetic(&self) -> bool
Returns true if this operator is arithmetic.
Trait Implementations§
impl Copy for BinOp
impl Eq for BinOp
impl StructuralPartialEq for BinOp
Auto Trait Implementations§
impl Freeze for BinOp
impl RefUnwindSafe for BinOp
impl Send for BinOp
impl Sync for BinOp
impl Unpin for BinOp
impl UnsafeUnpin for BinOp
impl UnwindSafe for BinOp
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