Expand description
Bitfield extraction, checksums, and header trait. Bitfield extraction, checksums, and header trait.
Functionsยง
- check_
bits_ u8 - Returns true if any bit in
maskis set inbitmap. - checksum_
u8 - Computes an XOR checksum over a byte slice.
- get_
bits_ u8 - Returns the bits from
bitmapspecified bymask, right-aligned. - get_
bits_ u16 - Returns the bits from
bitmapspecified bymask, right-aligned. - get_
bits_ u32 - Returns the bits from
bitmapspecified bymask, right-aligned. - min_len
- Returns the minimum number of bytes required to represent the given u64 value.
- set_
bits_ u8 - Returns
bitmapwith the bits specified bymaskset tovalue. - set_
bits_ u16 - Returns
bitmapwith the bits specified bymaskset tovalue. - set_
bits_ u32 - Returns
bitmapwith the bits specified bymaskset tovalue. - validate_
checksum_ u8 - Returns true if the XOR checksum of the slice (including the checksum byte) is zero.