fluvio
fluvio copied to clipboard
Protocol: Enum with custom tag union
Admin object (sc schema), uses enum to represent various objects. It uses string based type encoding. For example, given enum like this
Enum AdminList {
Spu(SpuSpec),
Object2(MyObject)
}
It uses string to denote type. So in the wire representation:
"SPU", "SpuSpec"
It would be good to have some kind enum tagging support like: https://serde.rs/enum-representations.html. One way to do is this representation such as:
#[fluvio(....)]
Enum AdminList {
Spu { (String, SpuSpec},
Object2 { (String, MyObject}
}
Stale issue message
The new control plane API uses string type to encode type. No longer relevant