Enum IntBinOp
pub enum IntBinOp {
Show 16 variants
Add,
AddUnchecked,
Sub,
SubUnchecked,
Mul,
MulUnchecked,
Div,
DivExact,
Rem,
Shl,
ShlUnchecked,
Shr,
ShrUnchecked,
BitAnd,
BitOr,
BitXor,
}Variants§
Add
Add two integer values.
AddUnchecked
Add two integer values. Throws UB on overflow.
Sub
Subtract two integer values.
SubUnchecked
Subtract two integer values. Throws UB on overflow.
Mul
Multiply two integer values.
MulUnchecked
Multiply two integer values. Throws UB on overflow.
Div
Divide two integer values.
UB on division by zero and on int::MIN / -1.
DivExact
Divide two integer values.
UB on division by zero, on int::MIN / -1, and on a non-zero remainder.
Rem
Remainder of a division, the % operator.
UB if the modulos (right operand) is zero and on int::MIN % -1.
Shl
Shift left <<
ShlUnchecked
Shift left <<
Throws UB if right operand not in range 0..left::BITS.
Shr
Shift right >> (logical shift for unsigned integers, arithmetic shift for signed integers)
ShrUnchecked
Shift right >> (logical shift for unsigned integers, arithmetic shift for signed integers)
Throws UB if right operand not in range 0..left::BITS.
BitAnd
Bitwise-and two integer values.
BitOr
Bitwise-or two integer values.
BitXor
Bitwise-xor two integer values.
Trait Implementations§
impl Copy for IntBinOp
§impl<'de> Deserialize<'de> for IntBinOp
impl<'de> Deserialize<'de> for IntBinOp
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IntBinOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IntBinOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for IntBinOp
§impl Ord for IntBinOp
impl Ord for IntBinOp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for IntBinOp
impl PartialOrd for IntBinOp
§impl Serialize for IntBinOp
impl Serialize for IntBinOp
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for IntBinOp
Auto Trait Implementations§
impl Freeze for IntBinOp
impl RefUnwindSafe for IntBinOp
impl Send for IntBinOp
impl Sync for IntBinOp
impl Unpin for IntBinOp
impl UnsafeUnpin for IntBinOp
impl UnwindSafe for IntBinOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> Dedup for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> HashConsable for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more