Struct bittle::LittleEndian
source · #[non_exhaustive]pub struct LittleEndian;
Expand description
Little-endian indexing for bit sets.
This can be used in combination with methods such as Bits::test_bit_in
.
Little-endian indexing is constructed increasingly from left to right for
individual primitives, such as the following u8
literal:
0b0010_0010u8
^ ^- index 6
'------ index 2
Arrays are treated the same as expected where the index grows from smallest to largest address:
0 --------- 8 8 -------- 15
[0b0010_0010u8, 0b1000_0000u8]
^ ^ ^- index 8
| '--------- index 6
'-------------- index 2