Module core::ops::bit

source ·

Macros

Traits

  • The bitwise AND operator &.
  • The bitwise AND assignment operator &=.
  • The bitwise OR operator |.
  • The bitwise OR assignment operator |=.
  • The bitwise XOR operator ^.
  • The bitwise XOR assignment operator ^=.
  • The unary logical negation operator !.
  • The left shift operator <<. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for _ << _, setting the result type for integer operations to the type of the left-hand-side operand. This means that though a << b and a.shl(b) are one and the same from an evaluation standpoint, they are different when it comes to type inference.
  • The left shift assignment operator <<=.
  • The right shift operator >>. Note that because this trait is implemented for all integer types with multiple right-hand-side types, Rust’s type checker has special handling for _ >> _, setting the result type for integer operations to the type of the left-hand-side operand. This means that though a >> b and a.shr(b) are one and the same from an evaluation standpoint, they are different when it comes to type inference.
  • The right shift assignment operator >>=.