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
Add trait to get binary size of messages #307
Labels
enhancement
New feature or request
Comments
Finding this to be somewhat necessary rather than a convenience when using typed enums getting their type from outside their own byte range (typed body getting type passed as ctx from the header) - can't convert those to bytes for measurement conveniently and need to edit them destructured which then has to update the header length. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a message contains only known size types (e.g. arrays and primitives, but no
Vec
etc.) it would be cool to have a const helper function that determines the size of a buffer that is guaranteed to fit the serialized message. This greatly improves the usability in environments without alloc.The text was updated successfully, but these errors were encountered: