dtolnay/serde-repr

Allow to keep human-readable name

RReverser opened this issue · 1 comments

I believe we discussed this in the original issue, but can't find it and thought I'd bring up again in this repo: it would be great if there was a way to use numeric representations for binary serializers / deserializers, but keep human-readable names of variants for human-readable sources and targets.

I'm guessing at this stage this would be a breaking change, and probably will instead require an opt-in attribute like #[serde_repr(match_human_readable = true)] (not sure about the name).

I would prefer not to build this into this crate's macros, but it would be great if someone else wants to maintain a more fully featured library with support for attributes such as that.