ndk icon indicating copy to clipboard operation
ndk copied to clipboard

The `event::Source::Any` variant is a bitmask from the C API which probably shouldn't be exposed like this in the Rust API

Open rib opened this issue 6 months ago • 2 comments

Since the Source is currently bound as a enum, I wouldn't expect it to contain bitmask values from the C API.

Maybe if it were instead exposed via bitflags::bitflags! {} it could be good to expose this, but I think sticking with an enum, with mutually exclusive source variants, seems appropriate here.

For the case where the source is unknown it could potentially be useful to have an .any() method (or similar) that would be able to internally use this bitmask against the unknown source value.

rib avatar Aug 06 '24 21:08 rib