pub enum BinOp {
Show 16 variants
Add,
Sub,
Mul,
Dot,
Cross,
Div,
Rem,
Pow,
OrElse,
AndAlso,
Less,
LessOrEqual,
Greater,
GreaterOrEqual,
Equal,
NotEqual,
}
Expand description
Binary operator.
Variants§
Add
Addition operator (+
).
Sub
Subtraction operator (-
).
Mul
Multiply operator (*
).
Dot
Dot product operator (*.
).
Cross
Cross product operator (x
).
Div
Division operator (/
).
Rem
Remainder operator (%
).
Pow
Power operator (^
).
OrElse
Lazy OR operator (||
).
AndAlso
Lazy AND operator (&&
).
Less
Less.
LessOrEqual
Less or equal.
Greater
Greater.
GreaterOrEqual
Greater or equal.
Equal
Equal.
NotEqual
Not equal.
Implementations§
source§impl BinOp
impl BinOp
sourcepub fn symbol_bool(self) -> &'static str
pub fn symbol_bool(self) -> &'static str
Returns symbol of binary operator in boolean variant.
sourcepub fn precedence(self) -> u8
pub fn precedence(self) -> u8
Returns the operator precedence level. Used to put parentheses in right places when printing out closures.
Trait Implementations§
Auto Trait Implementations§
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