Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non Unit enum variants #26

Open
evaporei opened this issue Sep 30, 2020 · 1 comment
Open

Support non Unit enum variants #26

evaporei opened this issue Sep 30, 2020 · 1 comment
Assignees
Labels

Comments

@evaporei
Copy link
Owner

evaporei commented Sep 30, 2020

We should handle the fields here:
https://github.com/otaviopace/edn-derive/blob/master/src/enums.rs#L16

Here are some helpful docs:

@evaporei evaporei self-assigned this Sep 30, 2020
@naomijub
Copy link
Collaborator

enum Abc {
    A(String, usize),
    B(i32),
    C(char)
}
-> :abc/a{0 "String" 1 8}
   :abc/b{0 3}
   :abc/c{0 \c}

enum Abcd {
    A(a: String, b: usize),
    B(d: i32),
    C(g: char)
}
-> :abcd/a{:a "String" :b 8}
   :abcd/b{:d 3}
   :abcd/c{:g \c}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants