Trait num_traits::ops::overflowing::OverflowingAdd[][src]

pub trait OverflowingAdd: Sized + Add<Self, Output = Self> {
    fn overflowing_add(&self, v: &Self) -> (Self, bool);
}

Performs addition with a flag for overflow.

Required methods

fn overflowing_add(&self, v: &Self) -> (Self, bool)[src]

Returns a tuple of the sum along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

Loading content...

Implementations on Foreign Types

impl OverflowingAdd for u8[src]

impl OverflowingAdd for u16[src]

impl OverflowingAdd for u32[src]

impl OverflowingAdd for u64[src]

impl OverflowingAdd for usize[src]

impl OverflowingAdd for u128[src]

impl OverflowingAdd for i8[src]

impl OverflowingAdd for i16[src]

impl OverflowingAdd for i32[src]

impl OverflowingAdd for i64[src]

impl OverflowingAdd for isize[src]

impl OverflowingAdd for i128[src]

Loading content...

Implementors

Loading content...