Crate bitptr

Crate bitptr 

Source
Expand description

§BitPtr

core::ptr for bit offsets.

pointers in Rust are locked to byte-offsets, or every 8 bits. bitptr aims to provide methods to help read and write data at off-byte offsets.

The primary use for bitptr is to pack data when the size of data is not known at compile time. For types and sizes known at compile time, consider bilge.

Structs§

BitPtr
A pointer to a bit in memory.
BitPtrMut
A mutable pointer to a bit in memory.
SubByte
A sub-byte offset.

Functions§

copy_nonoverlapping
Copies bit_count bits from src to dst. The source and destination must not overlap.
dangling
Creates a dangling raw bit pointer.
dangling_mut
Creates a dangling mutable raw bit pointer.
fill
Fills bit_count bits at dst.
null
Creates a null raw bit pointer.
null_mut
Creates a null mutable raw bit pointer.
swap_nonoverlapping
Swaps bit_count bits between the two regions of memory beginning at x and y. The two regions must not overlap.