pub enum BinOp {
Show 19 variants
Add,
Sub,
Mul,
Div,
Rem,
Shl,
Shr,
UShr,
Lt,
Le,
Gt,
Ge,
Eq,
Ne,
BitAnd,
BitXor,
BitOr,
And,
Or,
}Expand description
二元运算符(规范词汇表,语言负责映射)。
Variants§
Implementations§
Source§impl BinOp
impl BinOp
pub fn is_comparison(self) -> bool
pub fn is_short_circuit(self) -> bool
Sourcepub fn may_div_zero(self) -> bool
pub fn may_div_zero(self) -> bool
可能因除零抛异常的运算。
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