0.2.1 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseThis crate provides input types for nom parser combinators using bitvec. With those, you can use common nom combinators directly on streams of bits.
let data = [0xA5u8, 0x69, 0xF0, 0xC3];
let bits = data.view_bits::<Msb0>();
fn parser(bits: &BitSlice<Msb0, u8>) -> IResult<&BitSlice<Msb0, u8>, &BitSlice<Msb0, u8>> {
tag(bits![1, 0, 1, 0])(bits)
}
assert_eq!(parser(bits), Ok((&bits[..4], &bits[4..])));