opencv-rust
opencv-rust copied to clipboard
use bitmasks instead of pure enums where appropriate
i just ran into this with: MouseEventFlags: in most cases the flags parameter will be set to 0 in the callback triggered by highgui::set_mouse_callback. but 0 is not a valid value according to the enum, thus try_from will return an Err.
using something like bitmask-enum (i've never personally used this crate directly) might resolve this, as it'd also correctly allow setting multiple flags at the same time.
Thank you for the suggestion, I'll investigate!
This should now be implemented in v0.96.0