Image a function that would look like this
foo(VIDEO | INPUT | AUDIO);
This would initialize some C library to with audio video and input support. Would you do the same thing in Rust with https://doc.rust-lang.org/bitflags/bitflags/macro.bitflags!.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
};
foo(&capabilities)
Or are there any other alternatives that are more Rust like?