Expand description
Arithmetics helpers
Macros§
- checked
- Convert arithmetic operators within the given expression to their checked variants and provide detailed error strings about which operator has failed for diagnostic.
Structs§
- Error
- Checked arithmetics error.
Traits§
- Checked
Add - Performs addition, returning
Noneif overflow occurred. - Checked
Div - Performs division, returning
Noneon division by zero or if overflow occurred. - Checked
Mul - Performs multiplication, returning
Noneif overflow occurred. - Checked
Neg - Performs negation, returning
Noneif the result can’t be represented. - Checked
Rem - Performs integral remainder, returning
Noneon division by zero or if overflow occurred. - Checked
Sub - Performs subtraction, returning
Noneif overflow occurred. - Overflowing
Add - Performs addition with a flag for overflow.
- Overflowing
Sub - Performs substraction with a flag for overflow.