-
Notifications
You must be signed in to change notification settings - Fork 7
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
Multiple Bits for Flag #7
Comments
I have thought about that problem before and I am not sure what the best approach would be. I probably could add an option to allow duplicates. Alternatively Something like
|
Ideally, I would like to specify which parts of a bitfield can be orred together. In my case is doesn't make sense. INDICATOR_IDENTIFY can't be orred with an other INDICATOR_, but can with the at least 1 PORT_, and any number of (BOOT_RDM, RDM_CAPABLE, or UBEA_PRESENT). Not sure if that sort of feature should belong in this crate though. IDK |
I just tried sketching out what I wanted but it turns out I'd need powerset(n) types that each implemented BirOr for each type to do this. |
Ah, I am not sure that I can easily support this use case. At least I don't see an obvious API for it. I think if I would want this to be type safe I would create another wrapper on top of it that manages the indicator bits separately. |
Gives the error:
Is this not possible? I can't change how these bits are laid out as they are part of an existing network protocol.
The text was updated successfully, but these errors were encountered: