Skip to content

Customizable buffer type (proof of concept) #2912

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Mar 22, 2025

This demonstrates a backward compatible way that a format such as serde_json could use its own serde_json::Value as its buffer type for untagged enums and flatten, instead of "Content", solving #1183. Uses "return position impl trait in traits" (stabilized in Rust 1.75 by rust-lang/rust#115822) and "precise capturing in traits" (stabilizing in the near future by rust-lang/rust#138128).

@juntyr
Copy link

juntyr commented Mar 23, 2025

This would be WONDERFUL, thank you @dtolnay for exploring it <3

@Mingun
Copy link
Contributor

Mingun commented Mar 23, 2025

I hope, that before landing this, you will look at least an one implementation for a format other than JSON-like. I can help with testing this approach in quick-xml.

@juntyr
Copy link

juntyr commented Mar 23, 2025

I'm a maintainer for RON and we'd also be very interested

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

Successfully merging this pull request may close these issues.

3 participants