Skip to content
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

der: integrate Document type with yoke? #734

Closed
tarcieri opened this issue Oct 10, 2022 · 1 comment
Closed

der: integrate Document type with yoke? #734

tarcieri opened this issue Oct 10, 2022 · 1 comment

Comments

@tarcieri
Copy link
Member

The yoke crate implements support for attaching zero-copy deserialized data types (i.e. ones with lifetimes that borrow from the original encoded data) to the data they're decoded from:

https://docs.rs/yoke/

The der::Document type provides backing storage for an ASN.1 DER-encoded document. It might be interesting to (optionally) integrate Yoke or a newtype thereof as a way to parse and cache a zero-copy data type which borrows from a Document.

@tarcieri
Copy link
Member Author

Instead of trying to unify owned and ref types, we've ended up making types generic and splitting these use cases into two types.

Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant