pub trait PowerOf2DigitIterable<T> {
    type PowerOf2DigitIterator: PowerOf2DigitIterator<T>;

    // Required method
    fn power_of_2_digits(self, log_base: u64) -> Self::PowerOf2DigitIterator;
}
Expand description

Creates an iterator over a value’s base-$2^k$ digits.

Required Associated Types§

Required Methods§

source

fn power_of_2_digits(self, log_base: u64) -> Self::PowerOf2DigitIterator

Returns a double-ended iterator over a value’s digits in base $2^l$, where $k$ is log_base.

The iterator ends after the value’s most-significant digit.

Implementations on Foreign Types§

source§

impl PowerOf2DigitIterable<u8> for u8

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u8, u8>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u8, u8>

source§

impl PowerOf2DigitIterable<u8> for u16

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u16, u8>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u16, u8>

source§

impl PowerOf2DigitIterable<u8> for u32

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u32, u8>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u32, u8>

source§

impl PowerOf2DigitIterable<u8> for u64

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u64, u8>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u64, u8>

source§

impl PowerOf2DigitIterable<u8> for u128

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u128, u8>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u128, u8>

source§

impl PowerOf2DigitIterable<u8> for usize

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<usize, u8>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<usize, u8>

source§

impl PowerOf2DigitIterable<u16> for u8

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u8, u16>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u8, u16>

source§

impl PowerOf2DigitIterable<u16> for u16

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u16, u16>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u16, u16>

source§

impl PowerOf2DigitIterable<u16> for u32

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u32, u16>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u32, u16>

source§

impl PowerOf2DigitIterable<u16> for u64

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u64, u16>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u64, u16>

source§

impl PowerOf2DigitIterable<u16> for u128

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u128, u16>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u128, u16>

source§

impl PowerOf2DigitIterable<u16> for usize

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<usize, u16>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<usize, u16>

source§

impl PowerOf2DigitIterable<u32> for u8

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u8, u32>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u8, u32>

source§

impl PowerOf2DigitIterable<u32> for u16

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u16, u32>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u16, u32>

source§

impl PowerOf2DigitIterable<u32> for u32

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u32, u32>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u32, u32>

source§

impl PowerOf2DigitIterable<u32> for u64

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u64, u32>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u64, u32>

source§

impl PowerOf2DigitIterable<u32> for u128

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u128, u32>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u128, u32>

source§

impl PowerOf2DigitIterable<u32> for usize

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<usize, u32>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<usize, u32>

source§

impl PowerOf2DigitIterable<u64> for u8

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u8, u64>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u8, u64>

source§

impl PowerOf2DigitIterable<u64> for u16

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u16, u64>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u16, u64>

source§

impl PowerOf2DigitIterable<u64> for u32

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u32, u64>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u32, u64>

source§

impl PowerOf2DigitIterable<u64> for u64

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u64, u64>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u64, u64>

source§

impl PowerOf2DigitIterable<u64> for u128

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u128, u64>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u128, u64>

source§

impl PowerOf2DigitIterable<u64> for usize

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<usize, u64>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<usize, u64>

source§

impl PowerOf2DigitIterable<u128> for u8

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u8, u128>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u8, u128>

source§

impl PowerOf2DigitIterable<u128> for u16

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u16, u128>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u16, u128>

source§

impl PowerOf2DigitIterable<u128> for u32

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u32, u128>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u32, u128>

source§

impl PowerOf2DigitIterable<u128> for u64

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u64, u128>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u64, u128>

source§

impl PowerOf2DigitIterable<u128> for u128

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u128, u128>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u128, u128>

source§

impl PowerOf2DigitIterable<u128> for usize

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<usize, u128>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<usize, u128>

source§

impl PowerOf2DigitIterable<usize> for u8

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u8, usize>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u8, usize>

source§

impl PowerOf2DigitIterable<usize> for u16

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u16, usize>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u16, usize>

source§

impl PowerOf2DigitIterable<usize> for u32

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u32, usize>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u32, usize>

source§

impl PowerOf2DigitIterable<usize> for u64

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u64, usize>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u64, usize>

source§

impl PowerOf2DigitIterable<usize> for u128

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<u128, usize>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<u128, usize>

source§

impl PowerOf2DigitIterable<usize> for usize

source§

fn power_of_2_digits( self, log_base: u64 ) -> PrimitivePowerOf2DigitIterator<usize, usize>

Returns a double-ended iterator over the base-$2^k$ digits of a primitive unsigned integer.

The forward order is ascending, so that less-significant digits appear first. There are no trailing zeros going forward, or leading zeros going backward.

If it’s necessary to get a [Vec] of all the digits, consider using to_power_of_2_digits_asc or to_power_of_2_digits_desc instead.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if log_base is larger than the width of output type width.

§Examples

See here.

§

type PowerOf2DigitIterator = PrimitivePowerOf2DigitIterator<usize, usize>

Implementors§