evaporei / edn-derive

[DEPRECATED]: Edn derive procedural macros for (De)Serialization
GNU Lesser General Public License v3.0
9 stars 2 forks source link

Support non Unit enum variants #26

Open evaporei opened 4 years ago

evaporei commented 4 years ago

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

Here are some helpful docs:

naomijub commented 4 years ago
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}