Function |checked_add
std/ops/num::|checked_add
Usage
|checked_add<N>(a, b)
Generics
◻ N:
CheckedAdd
Parameters
↳ a:
N
↳ b:
N
Return
↴ Option<N>
Add a
and b
, checking if overflow occurs
This function returns an option containing a + b
, or none if result cause overflow in data type.