You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been messing around with a library for some work stuff and had an interesting idea that would utilize tuple types, though they would need the Encode and Decode impls for this to work. my thought is that the tuples would be encoded as a SEQUENCE type, similar to arrays and Vecs, but allowing for heterogeneous types in the sequence. thoughts? only complication I think would be perhaps in the decoding step since right now the decode_sequence_of API expects a single type and the decode_sequence seems somewhat complicated for something like this (and I didn't quite understand exactly what the purpose of some of the parameters and args was).
The text was updated successfully, but these errors were encountered:
It would need to use decode_sequence, because as you said, heterogenous types. It would also need to still have field information for codecs like JER, which I think is the bigger issue, since if you need field names, why have a tuple? I think maybe one possibility is for small fixed inner sequence. I think this would be supplanted if anonymous struct language feature was ever stabilised.
I've been messing around with a library for some work stuff and had an interesting idea that would utilize tuple types, though they would need the
Encode
andDecode
impls for this to work. my thought is that the tuples would be encoded as aSEQUENCE
type, similar to arrays andVec
s, but allowing for heterogeneous types in the sequence. thoughts? only complication I think would be perhaps in the decoding step since right now thedecode_sequence_of
API expects a single type and thedecode_sequence
seems somewhat complicated for something like this (and I didn't quite understand exactly what the purpose of some of the parameters and args was).The text was updated successfully, but these errors were encountered: