-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace send
and recv
flags with a more type-safe API
#35
Comments
Just noticed there are statics (i was greping for NOBLOCK but it got renamed to DONTWAIT in newer ZMQ). But having a proper type would still seem more rustic (rustonic?). |
Hello @dcbishop. Rust proper is exploring a proper solution to passing around flags like these (see rust-lang/rust#6085 and rust-lang/rust#13072). Once something is decided, I'll switch |
The bitflags! macro should be able to solve this now. |
This will go in after 0.9, as there seems to be no way to still allow the use of "0" as a flag value using the bitflags crate. I guess for the sake of improved readability, this shouldn't be allowed, either. Thus this requires an API break. |
After having pondered about this for a while, I don't think that |
My current thinking goes in the direction of eliminating, instead of exposing |
Besides |
Just a status update: for the poll flags, I now have added a type alias in release/v0.8, see #151, this will be followed up by a switch to |
@rotty Any status update? Looks like v0.9 has still not been released. |
The current status in
|
send
and recv
flags with a more type-safe API
Currently send/recv functions just take them as an int and there are no defines.
At the very least there should be static definitions. But would probably be better as a proper 'Flag' type (enum?).
The text was updated successfully, but these errors were encountered: