Module stp258_traits::arithmetic[][src]

Traits

Bounded

Numbers which have upper and lower bounds

CheckedAdd

Performs addition that returns None instead of wrapping around on overflow.

CheckedDiv

Performs division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.

CheckedMul

Performs multiplication that returns None instead of wrapping around on underflow or overflow.

CheckedShl

Performs a left shift that returns None on shifts larger than the type width.

CheckedShr

Performs a right shift that returns None on shifts larger than the type width.

CheckedSub

Performs subtraction that returns None instead of wrapping around on underflow.

One

Defines a multiplicative identity element for Self.

Signed

Useful functions for signed numbers (i.e. numbers that can be negative).

SimpleArithmetic

A meta trait for arithmetic.

Zero

Defines an additive identity element for Self.