How would you wrap C bitfalgs in Rust?

Image a function that would look like this


This would initialize some C library to with audio video and input support. Would you do the same thing in Rust with!.html?

Or would you prefer something like this

struct Capabilities{
    video: bool,
    input: bool,
    audio: bool,
let capabilities = Capabilities{
    video: true,
    audio: true,
    input: true

Or are there any other alternatives that are more Rust like?


Also I should probably add that I am trying to create a higher level library that uses a C library in the back, not a direct C wrapper.

It's perfectly good to use bitflags! in high-level libraries. It's even used in native Rust libraries with no C code at all.