pub trait WrappingAdd: Sized + Add<Self, Output = Self> {
    // Required method
    fn wrapping_add(&self, v: &Self) -> Self;
}
Expand description

Performs addition that wraps around on overflow.

Required Methods§

source

fn wrapping_add(&self, v: &Self) -> Self

Wrapping (modular) addition. Computes self + other, wrapping around at the boundary of the type.

Implementations on Foreign Types§

source§

impl WrappingAdd for u16

source§

fn wrapping_add(&self, v: &u16) -> u16

source§

impl WrappingAdd for u32

source§

fn wrapping_add(&self, v: &u32) -> u32

source§

impl WrappingAdd for i16

source§

fn wrapping_add(&self, v: &i16) -> i16

source§

impl WrappingAdd for isize

source§

fn wrapping_add(&self, v: &isize) -> isize

source§

impl WrappingAdd for u8

source§

fn wrapping_add(&self, v: &u8) -> u8

source§

impl WrappingAdd for i32

source§

fn wrapping_add(&self, v: &i32) -> i32

source§

impl WrappingAdd for i128

source§

fn wrapping_add(&self, v: &i128) -> i128

source§

impl<T> WrappingAdd for Wrapping<T>where T: WrappingAdd, Wrapping<T>: Add<Wrapping<T>, Output = Wrapping<T>>,

source§

fn wrapping_add(&self, v: &Wrapping<T>) -> Wrapping<T>

source§

impl WrappingAdd for u128

source§

fn wrapping_add(&self, v: &u128) -> u128

source§

impl WrappingAdd for u64

source§

fn wrapping_add(&self, v: &u64) -> u64

source§

impl WrappingAdd for i8

source§

fn wrapping_add(&self, v: &i8) -> i8

source§

impl WrappingAdd for i64

source§

fn wrapping_add(&self, v: &i64) -> i64

source§

impl WrappingAdd for usize

source§

fn wrapping_add(&self, v: &usize) -> usize

Implementors§