Trait malachite_base::num::arithmetic::traits::OverflowingSubAssign
source · [−]pub trait OverflowingSubAssign<RHS = Self> {
fn overflowing_sub_assign(&mut self, other: RHS) -> bool;
}
Expand description
Subtracts a number by 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_sub_assign(&mut self, other: RHS) -> bool
Implementations on Foreign Types
sourceimpl OverflowingSubAssign<u8> for u8
impl OverflowingSubAssign<u8> for u8
sourcefn overflowing_sub_assign(&mut self, other: u8) -> bool
fn overflowing_sub_assign(&mut self, other: u8) -> bool
Subtracts a number by 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 OverflowingSubAssign<u16> for u16
impl OverflowingSubAssign<u16> for u16
sourcefn overflowing_sub_assign(&mut self, other: u16) -> bool
fn overflowing_sub_assign(&mut self, other: u16) -> bool
Subtracts a number by 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 OverflowingSubAssign<u32> for u32
impl OverflowingSubAssign<u32> for u32
sourcefn overflowing_sub_assign(&mut self, other: u32) -> bool
fn overflowing_sub_assign(&mut self, other: u32) -> bool
Subtracts a number by 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 OverflowingSubAssign<u64> for u64
impl OverflowingSubAssign<u64> for u64
sourcefn overflowing_sub_assign(&mut self, other: u64) -> bool
fn overflowing_sub_assign(&mut self, other: u64) -> bool
Subtracts a number by 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 OverflowingSubAssign<u128> for u128
impl OverflowingSubAssign<u128> for u128
sourcefn overflowing_sub_assign(&mut self, other: u128) -> bool
fn overflowing_sub_assign(&mut self, other: u128) -> bool
Subtracts a number by 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 OverflowingSubAssign<usize> for usize
impl OverflowingSubAssign<usize> for usize
sourcefn overflowing_sub_assign(&mut self, other: usize) -> bool
fn overflowing_sub_assign(&mut self, other: usize) -> bool
Subtracts a number by 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 OverflowingSubAssign<i8> for i8
impl OverflowingSubAssign<i8> for i8
sourcefn overflowing_sub_assign(&mut self, other: i8) -> bool
fn overflowing_sub_assign(&mut self, other: i8) -> bool
Subtracts a number by 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 OverflowingSubAssign<i16> for i16
impl OverflowingSubAssign<i16> for i16
sourcefn overflowing_sub_assign(&mut self, other: i16) -> bool
fn overflowing_sub_assign(&mut self, other: i16) -> bool
Subtracts a number by 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 OverflowingSubAssign<i32> for i32
impl OverflowingSubAssign<i32> for i32
sourcefn overflowing_sub_assign(&mut self, other: i32) -> bool
fn overflowing_sub_assign(&mut self, other: i32) -> bool
Subtracts a number by 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 OverflowingSubAssign<i64> for i64
impl OverflowingSubAssign<i64> for i64
sourcefn overflowing_sub_assign(&mut self, other: i64) -> bool
fn overflowing_sub_assign(&mut self, other: i64) -> bool
Subtracts a number by 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 OverflowingSubAssign<i128> for i128
impl OverflowingSubAssign<i128> for i128
sourcefn overflowing_sub_assign(&mut self, other: i128) -> bool
fn overflowing_sub_assign(&mut self, other: i128) -> bool
Subtracts a number by 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 OverflowingSubAssign<isize> for isize
impl OverflowingSubAssign<isize> for isize
sourcefn overflowing_sub_assign(&mut self, other: isize) -> bool
fn overflowing_sub_assign(&mut self, other: isize) -> bool
Subtracts a number by 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.