Trait WrappingAddAssign

Source
pub trait WrappingAddAssign<RHS = Self> {
    // Required method
    fn wrapping_add_assign(&mut self, other: RHS);
}
Expand description

Adds a number to another number in place, wrapping around at the boundary of the type.

Required Methods§

Source

fn wrapping_add_assign(&mut self, other: RHS)

Implementations on Foreign Types§

Source§

impl WrappingAddAssign for i8

Source§

fn wrapping_add_assign(&mut self, other: i8)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for i16

Source§

fn wrapping_add_assign(&mut self, other: i16)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for i32

Source§

fn wrapping_add_assign(&mut self, other: i32)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for i64

Source§

fn wrapping_add_assign(&mut self, other: i64)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for i128

Source§

fn wrapping_add_assign(&mut self, other: i128)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for isize

Source§

fn wrapping_add_assign(&mut self, other: isize)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for u8

Source§

fn wrapping_add_assign(&mut self, other: u8)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for u16

Source§

fn wrapping_add_assign(&mut self, other: u16)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for u32

Source§

fn wrapping_add_assign(&mut self, other: u32)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for u64

Source§

fn wrapping_add_assign(&mut self, other: u64)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for u128

Source§

fn wrapping_add_assign(&mut self, other: u128)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl WrappingAddAssign for usize

Source§

fn wrapping_add_assign(&mut self, other: usize)

Adds a number to another number in place, wrapping around at the boundary of the type.

$x \gets z$, where $z \equiv x + y \mod 2^W$ and $W$ is Self::WIDTH.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§