pub enum BinOp {
Show 22 variants Add, AddUnchecked, Sub, SubUnchecked, Mul, MulUnchecked, Div, Rem, BitXor, BitAnd, BitOr, Shl, ShlUnchecked, Shr, ShrUnchecked, Eq, Lt, Le, Ne, Ge, Gt, Offset,
}

Variants§

§

Add

The + operator (addition)

§

AddUnchecked

Like Add, but with UB on overflow. (Integers only.)

§

Sub

The - operator (subtraction)

§

SubUnchecked

Like Sub, but with UB on overflow. (Integers only.)

§

Mul

The * operator (multiplication)

§

MulUnchecked

Like Mul, but with UB on overflow. (Integers only.)

§

Div

The / operator (division)

For integer types, division by zero is UB, as is MIN / -1 for signed. The compiler should have inserted checks prior to this.

Floating-point division by zero is safe, and does not need guards.

§

Rem

The % operator (modulus)

For integer types, using zero as the modulus (second operand) is UB, as is MIN % -1 for signed. The compiler should have inserted checks prior to this.

Floating-point remainder by zero is safe, and does not need guards.

§

BitXor

The ^ operator (bitwise xor)

§

BitAnd

The & operator (bitwise and)

§

BitOr

The | operator (bitwise or)

§

Shl

The << operator (shift left)

The offset is truncated to the size of the first operand before shifting.

§

ShlUnchecked

Like Shl, but is UB if the RHS >= LHS::BITS

§

Shr

The >> operator (shift right)

The offset is truncated to the size of the first operand before shifting.

This is an arithmetic shift if the LHS is signed and a logical shift if the LHS is unsigned.

§

ShrUnchecked

Like Shl, but is UB if the RHS >= LHS::BITS

§

Eq

The == operator (equality)

§

Lt

The < operator (less than)

§

Le

The <= operator (less than or equal to)

§

Ne

The != operator (not equal to)

§

Ge

The >= operator (greater than or equal to)

§

Gt

The > operator (greater than)

§

Offset

The ptr.offset operator

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where H: Hash + ?Sized, B: BuildHasher,

source§

impl<Q, K> Comparable<K> for Qwhere Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<N> NodeTrait for Nwhere N: Copy + Ord + Hash,