Trait num_traits::CheckedAdd [] [src]

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

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

impl CheckedAdd for u32
[src]

[src]

impl CheckedAdd for isize
[src]

[src]

impl CheckedAdd for i8
[src]

[src]

impl CheckedAdd for u8
[src]

[src]

impl CheckedAdd for i16
[src]

[src]

impl CheckedAdd for i32
[src]

[src]

impl CheckedAdd for u16
[src]

[src]

impl CheckedAdd for u64
[src]

[src]

impl CheckedAdd for usize
[src]

[src]

impl CheckedAdd for i64
[src]

[src]

Implementors