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

Remove feature gate for Encoding #698

Closed
desaikd opened this issue Jan 18, 2024 · 3 comments
Closed

Remove feature gate for Encoding #698

desaikd opened this issue Jan 18, 2024 · 3 comments

Comments

@desaikd
Copy link
Contributor

desaikd commented Jan 18, 2024

Encoding is gated under a feature "experimental-lazy-reader". This needs to be removed for 1.0 release.
Encoding and LazyEncoder share some similar functionalities and needs to be modified to keep only one of these.

@zslayton
Copy link
Contributor

zslayton commented Feb 9, 2024

The practical effect of this change will be that Element::read_* and Element::write_* methods will be able to accept a ReadConfig and WriteConfig respectively, allowing users to (e.g.) specify a Catalog or request a particular version of Ion. These types also future-proof these methods by giving us an avenue by which to add more options without modifying the API.

@popematt
Copy link
Contributor

If we remove the feature gate for Encoding, then we need to add a feature gate specifically to the Ion 1.1 encodings (until the Ion 1.1 spec is finalized). Currently, the Cargo.toml file does not list any feature for Ion 1.1.

@zslayton
Copy link
Contributor

Interestingly, I've learned that it's possible to expose a type that's generic over E: Encoding without making Encoding itself pub, which is nice. This is currently the case with WriteConfig<E: Encoding>. In light of that, I'm closing this for now. If anyone disagrees, please re-open this and we'll discuss.

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

3 participants