Crate simple_bitrange

Source
Expand description

§A simple bit range crate

This crate aims to facilitate the extraction of bits in a small, simple crate. While it does not have as many bells and whistle as many other crates, simplicity is the key here.

§Usage examples

Extract bits from slice of bytes:

let y: u32 = 0b00001111_11110000_01010000_00001010;
let p: &[u8] = &y.to_le_bytes();
let ret: u32 = p.range_read_le(..);

assert_eq!(ret, y);

Traits§

BitRangeRead
A simple bit extraction definition.
BitRangeWrite
A simple bit write definition.