`derive_where` for serde
Would it be possible to support serde derive macros (`Serialize` & `Deserialize`) in `derive-where`?
Currently, if you put fields from associated types, you have to manually put `#[serde(bounds(serialize = "XXX: Serialize", deserialize = "XXX: Deserialize<'de>"))]`, which can amount to a lot of boilerplate, and might not even be possible to generate in declarative macros (at least I didn't find any way to).
To not reimplement the whole `serde` in this crate, you can just emit the corresponding `#[serde(bounds)]` and hand off the rest to the upstream derive macro
关闭于 2025-05-17 8 条评论