serde
serde copied to clipboard
Customizable buffer type (proof of concept)
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 https://github.com/serde-rs/serde/issues/1183. Uses "return position impl trait in traits" (stabilized in Rust 1.75 by https://github.com/rust-lang/rust/pull/115822) and "precise capturing in traits" (stabilized in Rust 1.87 by https://github.com/rust-lang/rust/pull/138128).
This would be WONDERFUL, thank you @dtolnay for exploring it <3
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.
I'm a maintainer for RON and we'd also be very interested
@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?
Any progress here?