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

Squares a number in place.

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 OverflowingSquareAssign for i8

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for i16

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for i32

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for i64

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for i128

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for isize

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for u8

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for u16

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for u32

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for u64

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for u128

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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 OverflowingSquareAssign for usize

source§

fn overflowing_square_assign(&mut self) -> bool

Squares a 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§