pub enum BinOp {
Add,
Sub,
Mul,
Div,
Pow,
Equal,
NotEqual,
Less,
LessEqual,
Greater,
GreaterEqual,
}Expand description
Binary operators: arithmetic and comparison.
Variants§
Add
Addition (+)
Sub
Subtraction (-)
Mul
Multiplication (*)
Div
Division (/)
Pow
Exponentiation (^)
Equal
Equality (==)
NotEqual
Inequality (!=)
Less
Less than (<)
LessEqual
Less than or equal (<=)
Greater
Greater than (>)
GreaterEqual
Greater than or equal (>=)
Implementations§
Source§impl BinOp
impl BinOp
pub fn from_token(token: &Token<'_>) -> Self
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