Skip to content

Could impl_deserialize_for_internally_tagged_enum! handle a default case? #629

Closed
@aesteve

Description

@aesteve

Hello and thanks a lot for your work.

Would it be possible (and would it make sense) for impl_deserialize_for_internally_tagged_enum to handle a default case?

Like "for every other value of this tag, just deserialise to this enum variant.

Not sure how common this is but I'm facing this exact pattern where I'd like to handle a few variants that I know are specific, and all the rest can just be fall into a generic struct.

I hope it's clear, sorry if it's already possible and I missed it. Happy to update the docs to highlight it in this case.

Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions