Trait malachite_base::num::arithmetic::traits::OverflowingAddAssign
source · [−]pub trait OverflowingAddAssign<RHS = Self> {
fn overflowing_add_assign(&mut self, other: RHS) -> bool;
}
Expand description
Adds a number to another number in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is assigned.
Required Methods
fn overflowing_add_assign(&mut self, other: RHS) -> bool
Implementations on Foreign Types
sourceimpl OverflowingAddAssign<u8> for u8
impl OverflowingAddAssign<u8> for u8
sourcefn overflowing_add_assign(&mut self, other: u8) -> bool
fn overflowing_add_assign(&mut self, other: u8) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<u16> for u16
impl OverflowingAddAssign<u16> for u16
sourcefn overflowing_add_assign(&mut self, other: u16) -> bool
fn overflowing_add_assign(&mut self, other: u16) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<u32> for u32
impl OverflowingAddAssign<u32> for u32
sourcefn overflowing_add_assign(&mut self, other: u32) -> bool
fn overflowing_add_assign(&mut self, other: u32) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<u64> for u64
impl OverflowingAddAssign<u64> for u64
sourcefn overflowing_add_assign(&mut self, other: u64) -> bool
fn overflowing_add_assign(&mut self, other: u64) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<u128> for u128
impl OverflowingAddAssign<u128> for u128
sourcefn overflowing_add_assign(&mut self, other: u128) -> bool
fn overflowing_add_assign(&mut self, other: u128) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<usize> for usize
impl OverflowingAddAssign<usize> for usize
sourcefn overflowing_add_assign(&mut self, other: usize) -> bool
fn overflowing_add_assign(&mut self, other: usize) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<i8> for i8
impl OverflowingAddAssign<i8> for i8
sourcefn overflowing_add_assign(&mut self, other: i8) -> bool
fn overflowing_add_assign(&mut self, other: i8) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<i16> for i16
impl OverflowingAddAssign<i16> for i16
sourcefn overflowing_add_assign(&mut self, other: i16) -> bool
fn overflowing_add_assign(&mut self, other: i16) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<i32> for i32
impl OverflowingAddAssign<i32> for i32
sourcefn overflowing_add_assign(&mut self, other: i32) -> bool
fn overflowing_add_assign(&mut self, other: i32) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<i64> for i64
impl OverflowingAddAssign<i64> for i64
sourcefn overflowing_add_assign(&mut self, other: i64) -> bool
fn overflowing_add_assign(&mut self, other: i64) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<i128> for i128
impl OverflowingAddAssign<i128> for i128
sourcefn overflowing_add_assign(&mut self, other: i128) -> bool
fn overflowing_add_assign(&mut self, other: i128) -> bool
Adds a number to another number, 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.
sourceimpl OverflowingAddAssign<isize> for isize
impl OverflowingAddAssign<isize> for isize
sourcefn overflowing_add_assign(&mut self, other: isize) -> bool
fn overflowing_add_assign(&mut self, other: isize) -> bool
Adds a number to another number, 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.