Trait PowerOf2
Source pub trait PowerOf2<POW> {
// Required method
fn power_of_2(pow: POW) -> Self;
}
Expand description
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
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.
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.