pub trait BitIterable {
    type BitIterator: DoubleEndedIterator<Item = bool> + Index<u64>;

    fn bits(self) -> Self::BitIterator;
}
Expand description

Defines an iterator over a value’s bits.

Required Associated Types

Required Methods

Returns a double-ended iterator over a number’s bits. When iterating in the forward direction, the iterator ends after the producing the number’s most-significant bit.

Implementations on Foreign Types

Returns a double-ended iterator over the bits of an unsigned primitive integer.

The forward order is ascending, so that less significant bits appear first. There are no trailing false bits going forward, or leading falses going backward.

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of an unsigned primitive integer.

The forward order is ascending, so that less significant bits appear first. There are no trailing false bits going forward, or leading falses going backward.

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of an unsigned primitive integer.

The forward order is ascending, so that less significant bits appear first. There are no trailing false bits going forward, or leading falses going backward.

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of an unsigned primitive integer.

The forward order is ascending, so that less significant bits appear first. There are no trailing false bits going forward, or leading falses going backward.

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of an unsigned primitive integer.

The forward order is ascending, so that less significant bits appear first. There are no trailing false bits going forward, or leading falses going backward.

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of an unsigned primitive integer.

The forward order is ascending, so that less significant bits appear first. There are no trailing false bits going forward, or leading falses going backward.

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of a signed primitive integer.

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

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of a signed primitive integer.

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

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of a signed primitive integer.

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

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of a signed primitive integer.

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

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of a signed primitive integer.

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

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Returns a double-ended iterator over the bits of a signed primitive integer.

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

If it’s necessary to get a Vec of all the bits, consider using to_bits_asc or to_bits_desc instead.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Implementors