-
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
Dictionaries for tuple data values #553
Conversation
Some explanation for potential reviewersThis branch introduces a new form of dispatch to accomplish code separation in child dictionaries in a situation where a child dictionary would need to know (and call) its parent, which rust does not allow to happen due to borrowing rules. The solution is to replace methods of the child dictionary by global functions (provided by the child dictionary) that receive only the parent dictionary and an id that allows the original child dictionary to be retrieved when needed. Some more magic with Any is used to cast these child dictionaries into the types that are required. The default setup for this can be seen in the "with parent" default implementations in The net effect of this stunt is that we can keep tuple serialisation/deserialisation code in the TupleDvDictionary although this code requires access to the parent dictionary to encode/decode values inside the tuple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good for now. Not sure how to efficiently solve the tuple_bytes
vs tuple_bytes_mut
issue, or if there even is a good solution currently.
Thanks for the helpful comments. Merged. |
This branch introduces support for labelled and unlabelled tuple data values to be used in the dictionary.