Skip to main content

WrappingAdd

Trait WrappingAdd 

Source
pub trait WrappingAdd<RHS = Self> {
    type Output;

    // Required method
    fn wrapping_add(self, other: RHS) -> Self::Output;
}
Expand description

Adds two numbers, wrapping around at the boundary of the type.

Required Associated Types§

Required Methods§

Source

fn wrapping_add(self, other: RHS) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl WrappingAdd for i8

Source§

fn wrapping_add(self, other: i8) -> i8

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = i8

Source§

impl WrappingAdd for i16

Source§

fn wrapping_add(self, other: i16) -> i16

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = i16

Source§

impl WrappingAdd for i32

Source§

fn wrapping_add(self, other: i32) -> i32

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = i32

Source§

impl WrappingAdd for i64

Source§

fn wrapping_add(self, other: i64) -> i64

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = i64

Source§

impl WrappingAdd for i128

Source§

fn wrapping_add(self, other: i128) -> i128

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = i128

Source§

impl WrappingAdd for isize

Source§

fn wrapping_add(self, other: isize) -> isize

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = isize

Source§

impl WrappingAdd for u8

Source§

fn wrapping_add(self, other: u8) -> u8

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = u8

Source§

impl WrappingAdd for u16

Source§

fn wrapping_add(self, other: u16) -> u16

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = u16

Source§

impl WrappingAdd for u32

Source§

fn wrapping_add(self, other: u32) -> u32

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = u32

Source§

impl WrappingAdd for u64

Source§

fn wrapping_add(self, other: u64) -> u64

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = u64

Source§

impl WrappingAdd for u128

Source§

fn wrapping_add(self, other: u128) -> u128

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = u128

Source§

impl WrappingAdd for usize

Source§

fn wrapping_add(self, other: usize) -> usize

This is a wrapper over the wrapping_add functions in the standard library, for example this one.

Source§

type Output = usize

Implementors§