Skip to content

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" (stabilized in Rust 1.87 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

@juntyr
Copy link

juntyr commented Jul 24, 2025

@dtolnay We just had another bug report in RON that we cannot fix because of not being able to customize the content/buffer type. Since precise capturing in traits was released in 1.87, would you be able to take another look at this PR?

@radu-byte
Copy link

Any progress here?

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

Labels

None yet

4 participants