Remote enum avoid duplication #1487
Unanswered
carlocorradini
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a remote enum and I would like to use
remote
attribute.Since it contains a default case with a
Unknown(u8)
, the remote enum cannot be used with theremote
attribute.Thanks to serde_as and FromInto, I can successfully use Serialize/Deserialize, but I have to manually map
From<...>
twice between my local enum and the remote one.Do you know a crate that has the same remote feature but doesn't have to have only "pure" values?
Thanks 🙏
Beta Was this translation helpful? Give feedback.
All reactions