pub trait OverflowingSubAssign<RHS = Self> {
    // Required method
    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§

source

fn overflowing_sub_assign(&mut self, other: RHS) -> bool

Implementations on Foreign Types§

source§

impl OverflowingSubAssign for i8

source§

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.

source§

impl OverflowingSubAssign for i16

source§

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.

source§

impl OverflowingSubAssign for i32

source§

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.

source§

impl OverflowingSubAssign for i64

source§

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.

source§

impl OverflowingSubAssign for i128

source§

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.

source§

impl OverflowingSubAssign for isize

source§

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.

source§

impl OverflowingSubAssign for u8

source§

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.

source§

impl OverflowingSubAssign for u16

source§

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.

source§

impl OverflowingSubAssign for u32

source§

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.

source§

impl OverflowingSubAssign for u64

source§

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.

source§

impl OverflowingSubAssign for u128

source§

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.

source§

impl OverflowingSubAssign for usize

source§

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.

Implementors§