Skip to content

Serialization / Deserialization derive macros should work for enums without data #923

@Lorak-mmk

Description

@Lorak-mmk

This looks like it can be a common case that users want to use structs like in this forum question: https://forum.scylladb.com/t/can-we-make-an-enum-serializable-so-it-can-go-to-and-from-a-cqlvalue-in-rust/1242
While I don't see any sensible way to derive for arbitrary enums, we could add support for enums without data.
I think this shouldn't be too hard. The main question is how to specify the type to serialize to (i32, u8 etc)?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions