pub enum BinaryOp {
Show 16 variants
Add,
Sub,
Mul,
Div,
Mod,
Pow,
Atan2,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
And,
Or,
Unless,
}Expand description
Binary operators
Variants§
Implementations§
Source§impl BinaryOp
impl BinaryOp
Sourcepub fn precedence(&self) -> u8
pub fn precedence(&self) -> u8
Get the precedence of this operator (higher = binds tighter)
Sourcepub fn is_right_associative(&self) -> bool
pub fn is_right_associative(&self) -> bool
Check if this operator is right-associative
Sourcepub fn is_comparison(&self) -> bool
pub fn is_comparison(&self) -> bool
Check if this is a comparison operator
Sourcepub fn is_set_operator(&self) -> bool
pub fn is_set_operator(&self) -> bool
Check if this is a set operator
Sourcepub fn is_arithmetic(&self) -> bool
pub fn is_arithmetic(&self) -> bool
Check if this is an arithmetic operator
Trait Implementations§
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