pub enum BinOp {
Add,
Sub,
Mul,
Div,
Pow,
Rem,
BitAnd,
BitOr,
Shl,
Shr,
}Expand description
Binary operators for arithmetic and bitwise operations.
Used in Ast::BinOp to specify the operation.
Variants§
Add
Addition (+).
Sub
Subtraction (-).
Mul
Multiplication (*).
Div
Division (/).
Pow
Exponentiation (^), right-associative.
Rem
Remainder/modulo (%).
BitAnd
Bitwise AND (&).
BitOr
Bitwise OR (|).
Shl
Left shift (<<).
Shr
Right shift (>>).
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 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