-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement Signature and Marshal for params::Variant #90
Conversation
I'd like to have a test that covers this in If it's not too much trouble I'd like a unmarshal implementation too. |
Is there a reason not to use the trait based Variant (now that it's actually usable)? No reason not to have this but I wanted to discourage the params based API but I wasn't sure if there are cases they cover the trait based API doesn't |
Yes, for |
Will do. |
Does a map with |
|
BTW, I think this change is moving things in this direction. Instead of using Does this improve #83? |
Oh, also, even with the new trait-based API, I believe having an enum with all possible dbus types is necessary. At least for receiving variants in args. And sending them... |
Sorry to be this nit-picky but the test uses |
There is the |
I actually didn't had a chance to use it yet, will try :) |
My usecase: I was implementing
org.freedesktop.DBus.Properties.GetAll
which returnsa{sv}
. In Rust's types that would beHashMap<&str, Variant>
, but I couldn't use it because of the missing impls.Container::make_dict_ref("s", "v", ...)
works, but not nearly as ergonomic and forces to go throughpush_old_param
instead of the newpush_param
.I did not implement
Unmarshal
, because I didn't need it yet. Let me know it I should add it too for completeness.