Open bouk opened 8 months ago
Thanks for the feedback. I agree this kind of struct would be more ergonomic to handle, but at the same time I don't currently see a way to fully autogenerate them.
Continuing with the ListUnits
example you mentioned, the only information we have in the XML descriptor is:
ListUnits(out a(ssssssouso) units);
I think this feature would require manually adding the struct definition and then either adding some overrides in the configuration or some automatic heuristic in the code-generator.
Did you maybe have something else in mind?
You can define structs to map types to in zbus: https://dbus2.github.io/zbus/client.html
It'd be nice if e.g.
list_units
returned a Vec like:Instead of the Vec of tuples we have right now