[rust-dev] Bitwise operations in rust.
slabode at aim.com
Wed Jan 15 08:36:33 PST 2014
On 01/15/2014 11:29 AM, Nicolas Silva wrote:
> I think enums are not a good fit for bitwise operations, it's not really
> meant for that.
I came to the same conclusion and came up with a nice macro to automate
that, seen here:
and used here
This enables a nice, C-like API when composing/extracting flags via the
bit-or and bit-and operators.
More information about the Rust-dev