Function byte_from_int_bit_array

Source
pub fn byte_from_int_bit_array(bits: &[u8]) -> Result<u8>
Expand description

Convert exactly 8 bits (0/1) into a single byte.

Returns error if:

  • bits.len() != 8
  • any bit is not 0 or 1