pub enum BinOp {
Show 13 variants
Add,
Sub,
Mul,
MulHi,
And,
Or,
Xor,
Shl,
Shr,
Min,
Max,
Div,
Rem,
}Expand description
Binary integer ops (operands of one type, except shift amounts).
Variants§
Add
Wrapping add.
Sub
Wrapping subtract.
Mul
Wrapping multiply (low 32 bits).
MulHi
High 32 bits of the exact 64-bit product (signed for i32).
And
Bitwise / logical and.
Or
Bitwise / logical or.
Xor
Bitwise / logical xor.
Shl
Left shift by b mod 32.
Shr
Right shift by b mod 32 (arithmetic for i32).
Min
Minimum.
Max
Maximum.
Div
Division, WGSL semantics: x / 0 = x, i32::MIN / −1 = i32::MIN;
signed division truncates.
Rem
Remainder, WGSL semantics: x % 0 = 0, i32::MIN % −1 = 0; the sign
follows the dividend.
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 UnsafeUnpin 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