pub enum BinaryOp {
Show 15 variants
Add,
Sub,
Mul,
Div,
Mod,
Pow,
Eq,
NotEq,
Lt,
Gt,
LtEq,
GtEq,
And,
Or,
In,
}Expand description
Binary operators
Variants§
Add
Addition operator (+)
Sub
Subtraction operator (-)
Mul
Multiplication operator (*)
Div
Division operator (/)
Mod
Modulo operator (%)
Pow
Power operator (**)
Eq
Equality operator (==)
NotEq
Inequality operator (!=)
Lt
Less than operator (<)
Gt
Greater than operator (>)
LtEq
Less than or equal operator (<=)
GtEq
Greater than or equal operator (>=)
And
Logical AND operator
Or
Logical OR operator
In
Membership test operator (IN)
Implementations§
Source§impl BinaryOp
impl BinaryOp
Sourcepub fn precedence(&self) -> Precedence
pub fn precedence(&self) -> Precedence
Returns the precedence level of this binary operator
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BinaryOp
impl<'de> Deserialize<'de> for BinaryOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for BinaryOp
impl Eq for BinaryOp
impl StructuralPartialEq for BinaryOp
Auto Trait Implementations§
impl Freeze for BinaryOp
impl RefUnwindSafe for BinaryOp
impl Send for BinaryOp
impl Sync for BinaryOp
impl Unpin for BinaryOp
impl UnwindSafe for BinaryOp
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