How does a C-style struct with a bitfield get represented in a Rust #[repr(C)] struct?
No, you can’t. There is an open issue about supporting bitfields, which doesn’t seem to be active. In the issue, @retep998 explains how bitfields are handled in winapi. That might be helpful if you need to handle bitfields in C interface. OP seems to aim at C interoperation, but if you just need bitfields functionality, … Read more