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

    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§

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§

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Implementors§