pub enum BinOp {
Show 20 variants
Add,
Sub,
Mul,
Div,
Rem,
Pow,
And,
Or,
Implies,
BitXor,
BitAnd,
BitOr,
Shl,
Shr,
Eq,
Lt,
Le,
Ne,
Ge,
Gt,
}Expand description
An Ast node representing a binary operator.
Variants§
Add
The + operator (addition)
Sub
The - operator (subtraction)
Mul
The * operator (multiplication)
Div
The / operator (division)
Rem
The % operator (modulus)
Pow
The ** operator (power)
And
The && operator (logical and)
Or
The || operator (logical or)
Implies
The -> operator (logical implication)
BitXor
The ^ operator (bitwise xor)
BitAnd
The & operator (bitwise and)
BitOr
The | operator (bitwise or)
Shl
The << operator (shift left)
Shr
The >> operator (shift right)
Eq
The == operator (equality)
Lt
The < operator (less than)
Le
The <= operator (less than or equal to)
Ne
The != operator (not equal to)
Ge
The >= operator (greater than or equal to)
Gt
The > operator (greater than)
Trait Implementations§
Source§impl Ord for BinOp
impl Ord for BinOp
Source§impl PartialOrd for BinOp
impl PartialOrd for BinOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more