pub trait PowerOf2<POW> {
    fn power_of_2(pow: POW) -> Self;
}
Expand description

Raises 2 to a power.

Required Methods

Implementations on Foreign Types

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the result is not representable.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the power is smaller than Self::MIN_EXPONENT or greater than Self::MAX_EXPONENT.

Examples

See here.

Raises 2 to an integer power.

$f(k) = 2^k$.

Worst-case complexity

Constant time and additional memory.

Panics

Panics if the power is smaller than Self::MIN_EXPONENT or greater than Self::MAX_EXPONENT.

Examples

See here.

Implementors