fluvio icon indicating copy to clipboard operation
fluvio copied to clipboard

Protocol: Enum with custom tag union

Open sehz opened this issue 2 years ago • 1 comments

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}
}

sehz avatar Oct 31 '21 02:10 sehz

Stale issue message

github-actions[bot] avatar Dec 30 '21 11:12 github-actions[bot]

The new control plane API uses string type to encode type. No longer relevant

sehz avatar Sep 01 '23 15:09 sehz