antonsmetanin commented on issue #365:
URL: https://github.com/apache/avro-rs/issues/365#issuecomment-3677407626

   @martin-g Thanks. I didn't read the whole thread, but I must note that 
`serde` distinguishes between unit variants
   ```rust
   enum E {
       A
   }
   ```
   and empty struct variants
   ```rust
   enum E {
       A {}
   }
   ```
   
   So I don't think mixed variants like
   ```rust
   enum E {
       A,
       B { field: i64 }
   }
   ```
   should be supported (except maybe with a single unit variant treated as 
null, as a special case, to make it consistent with `Option<T>`, but I'm not 
sure about this), but for most cases
   ```rust
   enum E {
       A {},
       B { field: i64 }
   }
   ```
   should be equivalent to the above and _should_ be supported.
   
   I think in general we should agree on a specification of how serde should 
map to Avro, and then test the implementation against it. I can try to work on 
a proposal when I have some free time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to