Module num_traits::ops::checked

source ·

Traits

  • Performs addition that returns None instead of wrapping around on overflow.
  • Performs division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.
  • Performs multiplication that returns None instead of wrapping around on underflow or overflow.
  • Performs negation that returns None if the result can’t be represented.
  • Performs an integral remainder that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.
  • Performs a left shift that returns None on shifts larger than or equal to the type width.
  • Performs a right shift that returns None on shifts larger than or equal to the type width.
  • Performs subtraction that returns None instead of wrapping around on underflow.