pub trait CheckedAdd: Sized + Add<Self, Output = Self> {
    fn checked_add(&self, v: &Self) -> Option<Self>;
}
Expand description

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

Required Methods

Adds two numbers, checking for overflow. If overflow happens, None is returned.

Implementations on Foreign Types

Implementors