Skip to content

derive_where for serde #100

Open
Open
@DCNick3

Description

@DCNick3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions