Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIssue #285: Add support for lengths other than 64 bits. #294
Conversation
|
@dtolnay Does this look like a good approach? |
|
Hi @tkaitchuck, I am not really involved with this project these days and I don't get the impression that there are current maintainers who could dedicate time to reviewing something like this in the context of how it fits into a long term design for bincode. That said, my first impression is that I would prefer if bincode did not support this. I think there is room for someone to make a different data format library that is more geared toward this sort of customization. I think it's fair for bincode to dictate a simple default format and we shouldn't feel the need to build in all manner of customization. |
|
Moved here: pravega#4 |
tkaitchuck commentedDec 13, 2019
•
edited
This change adds two new config values
string_sizeandarray_size.Both of which take an enum to allow the lengths of strings and vectors/arrays to be set to:
U8,U16,U32, andU64. WhereU64is the default. (Which is compatible with current behavior.)In the event that the data being serialized does not fit into the size specified the serialization will fail with
ErrorKind::SizeTypeLimitFixes #285 .