flagset
flagset copied to clipboard
Is there an ergonomic way to make Flagset<T> from Vec<T>?
Hello,
I'm a Rust newbie so apologies if this is more a language question than one for your crate, but am I missing an ergonomic way of taking a vec/iterable/arr/slice of T and making it into FlagSet<T>?
I've taken inspiration from what someone did here here and made a free function, but just wanted to know if I was missing something obvious.
There is a line here which hints why you might want to make your own container, but tbh I didn't really understand the tradeoffs. Is there something special on function APIs that means you wouldn't want to just use Flagset directly?
I was just wondering something similar. It might be worth implementing Extend to be able to gather a collection of FlagSets
into a single set. But I am also a bit new to this and am not sure. :slightly_smiling_face: