[−][src]Module sp_arithmetic::traits
Primitive traits for the runtime arithmetic.
Traits
AtLeast32Bit | A meta trait for arithmetic. |
BaseArithmetic | A meta trait for arithmetic type operations, regardless of any limitation on size. |
Bounded | Numbers which have upper and lower bounds |
CheckedAdd | Performs addition that returns |
CheckedDiv | Performs division that returns |
CheckedMul | Performs multiplication that returns |
CheckedShl | Performs a left shift that returns |
CheckedShr | Performs a right shift that returns |
CheckedSub | Performs subtraction that returns |
IntegerSquareRoot | A trait implementing integer square root. |
One | Defines a multiplicative identity element for |
SaturatedConversion | Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
|
Saturating | Simple trait to use checked mul and max value to give a saturated mul operation over supported types. |
UniqueSaturatedFrom | Just like |
UniqueSaturatedInto | Just like |
Zero | Defines an additive identity element for |