Traits§
- Byte
Iterator Callback - Callback for byte iteration.
We can’t return different types from the
iterate_bytes
and Fn traits don’t support associated types that’s why we use a callback with a generic function.
Functions§
- can_
iterate_ bytes - Returns if we can iterate over bytes, each representing 8 1-bit values.
- create_
partial_ sums_ lookup_ tables - Create a lookup table for partial sums of 8 consequent elements with coefficients corresponding to bits in a byte. The lookup table has the following structure: [ partial_sum_chunk_0_7_byte_0, partial_sum_chunk_0_7_byte_1, …, partial_sum_chunk_0_7_byte_255, partial_sum_chunk_8_15_byte_0, partial_sum_chunk_8_15_byte_1, …, partial_sum_chunk_8_15_byte_255, … ]
- is_
sequential_ bytes - Returns true if T implements
SequentialBytes
trait. Use a hack that exploits that array copying is optimized for theCopy
types. Unfortunately there is no more proper way to perform this check this in Rust at runtime. - iterate_
bytes - Iterate over bytes of a slice of the packed values.
The method panics if the packed field doesn’t support byte iteration, so use
can_iterate_bytes
to check it.