It is straightforward to make Enums serializable. It would be very similar to a serializer(Literal[...]) except that the data would get serialized into a proper member of the enum. I would always use the name of the enum as the serialized value, but others may want to use the enum value. For that reason, it may be better to add this feature as @enum_serializable so that a flag could be added in the future to use the enum values instead of the name as the serialized data.
It is straightforward to make
Enums serializable. It would be very similar to aserializer(Literal[...])except that the data would get serialized into a proper member of the enum. I would always use the name of the enum as the serialized value, but others may want to use the enum value. For that reason, it may be better to add this feature as@enum_serializableso that a flag could be added in the future to use the enum values instead of the name as the serialized data.