-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TryFromRpcValue: Implement externally tagged enums
If no `#rpcvalue(tag = "tag_key")]` attribute is specified, enums with named fields are converted to RpcValue map having single key indicating an enum variant in camelCase. enum Animal { Cat { name: String, age: i32 }, } would be represented as: { "cat": { "name": ..., "age": ... }} This is closer to encoding of enums in serde.
- Loading branch information
Showing
3 changed files
with
52 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters