pub trait OverflowingAddMulAssign<Y = Self, Z = Self> {
    // Required method
    fn overflowing_add_mul_assign(&mut self, y: Y, z: Z) -> bool;
}
Expand description

Adds a number and the product of two other numbers, in place.

Returns a tuple of the result along with a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is returned.

Required Methods§

source

fn overflowing_add_mul_assign(&mut self, y: Y, z: Z) -> bool

Implementations on Foreign Types§

source§

impl OverflowingAddMulAssign for i8

source§

fn overflowing_add_mul_assign(&mut self, y: i8, z: i8) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for i16

source§

fn overflowing_add_mul_assign(&mut self, y: i16, z: i16) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for i32

source§

fn overflowing_add_mul_assign(&mut self, y: i32, z: i32) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for i64

source§

fn overflowing_add_mul_assign(&mut self, y: i64, z: i64) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for i128

source§

fn overflowing_add_mul_assign(&mut self, y: i128, z: i128) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for isize

source§

fn overflowing_add_mul_assign(&mut self, y: isize, z: isize) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for u8

source§

fn overflowing_add_mul_assign(&mut self, y: u8, z: u8) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for u16

source§

fn overflowing_add_mul_assign(&mut self, y: u16, z: u16) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for u32

source§

fn overflowing_add_mul_assign(&mut self, y: u32, z: u32) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for u64

source§

fn overflowing_add_mul_assign(&mut self, y: u64, z: u64) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for u128

source§

fn overflowing_add_mul_assign(&mut self, y: u128, z: u128) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

source§

impl OverflowingAddMulAssign for usize

source§

fn overflowing_add_mul_assign(&mut self, y: usize, z: usize) -> bool

Adds a number and the product of two other numbers, in place.

Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Implementors§