pub trait OverflowingPowAssign<RHS = Self> {
    // Required method
    fn overflowing_pow_assign(&mut self, exp: RHS) -> bool;
}
Expand description

Raises a number to a power 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_pow_assign(&mut self, exp: RHS) -> bool

Implementations on Foreign Types§

source§

impl OverflowingPowAssign for u64

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for i8

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for i16

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for i32

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for i64

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for i128

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for isize

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for u8

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for u16

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for u32

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for u128

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

source§

impl OverflowingPowAssign<u64> for usize

source§

fn overflowing_pow_assign(&mut self, exp: u64) -> bool

Raises a number to a power, in place.

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

§Worst-case complexity

$T(n) = O(n)$

$M(n) = O(1)$

where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits().

§Examples

See here.

Implementors§