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'm looking into serde support for my D-Bus bindings, but quickly ran into problems with trying to Serialize an empty array.
D-Bus allows typing of arrays, i e, all elements must be the same type. I could take that type from the first element, if it weren't for the fact that arrays can be empty. So, if I receive a serialize_seq_fixed_size with a size of 0 (or a serialize_seq directly followed by a serialize_seq_end), I have no idea if I need to append an empty D-Bus array of i32s, &strs or something else.
Edit: The same applies to maps, which are also strongly typed.
The text was updated successfully, but these errors were encountered:
diwic
changed the title
Sequence types needed
Sequence and map types needed
Nov 4, 2016
We could make serialize_seq generic over the type to be serialized, just like serialize_seq_elt. But we'd still need a way to use a Serialize type without an object. I think this is closely related to the tagging troubles we have with cbor
I'm looking into serde support for my D-Bus bindings, but quickly ran into problems with trying to Serialize an empty array.
D-Bus allows typing of arrays, i e, all elements must be the same type. I could take that type from the first element, if it weren't for the fact that arrays can be empty. So, if I receive a
serialize_seq_fixed_size
with a size of 0 (or aserialize_seq
directly followed by aserialize_seq_end
), I have no idea if I need to append an empty D-Bus array ofi32
s,&str
s or something else.Edit: The same applies to maps, which are also strongly typed.
The text was updated successfully, but these errors were encountered: