Trait CheckedAdd

trait CheckedAdd: Sized + Add<Self, Output = Self>

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

Required Methods

fn checked_add(self: &Self, v: &Self) -> Option<Self>

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

Implementors