pub trait OverflowingAbsAssign {
    // Required method
    fn overflowing_abs_assign(&mut self) -> bool;
}
Expand description

Replaces a number with its absolute value.

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

Required Methods§

Implementations on Foreign Types§

source§

impl OverflowingAbsAssign for i8

source§

fn overflowing_abs_assign(&mut self) -> bool

Replaces a number with its absolute value.

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 OverflowingAbsAssign for i16

source§

fn overflowing_abs_assign(&mut self) -> bool

Replaces a number with its absolute value.

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 OverflowingAbsAssign for i32

source§

fn overflowing_abs_assign(&mut self) -> bool

Replaces a number with its absolute value.

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 OverflowingAbsAssign for i64

source§

fn overflowing_abs_assign(&mut self) -> bool

Replaces a number with its absolute value.

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 OverflowingAbsAssign for i128

source§

fn overflowing_abs_assign(&mut self) -> bool

Replaces a number with its absolute value.

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 OverflowingAbsAssign for isize

source§

fn overflowing_abs_assign(&mut self) -> bool

Replaces a number with its absolute value.

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§