Expand description
Reads the bit from src
.
Original
Safety
Behavior is undefined if any of the following conditions are violated:
src
must be valid for reads.src
must point to a properly initialized value of typeT
.
Examples
use bitvec::prelude::*;
let data = 128u8;
let ptr = BitPtr::<_, Msb0, _>::from_ref(&data);
assert!(unsafe {
bitvec::ptr::read(ptr)
});