-
Notifications
You must be signed in to change notification settings - Fork 26
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
Consider passing around Vec<ASN1Block> instead of slices in FromASN1 #2
Comments
OK, now that I'm looking at this, I'm not sure I understand your concern. Do you have an example you can share? In particular, the library passes around slices specifically to avoid having to do deep copies. So the only thing that should be being duplicated is a ptr/start/end construct, not the |
I meant in the Sorry for the delay in responding. I was waiting for the ability to make my work public so I could share the issue I was having. I either need to be able to thread a lifetime through during deserialization or be able to pop off ASN1Blocks and move the memory inside of the struct. Also we can definitely macro this up. Would you mind me contributing some derive macros for |
OK, I get it. I'm not sure what the best way forward is, but I'm currently thinking something like a mutable iterator. Let me play around with it. Also, I'd be happy to accept derive macros. |
This would allow for allocation-less parsing. Currently it's required to clone data from the ASN1Blocks to move it into domain objects.
The text was updated successfully, but these errors were encountered: