-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add SerializeTuple and use it for code generated by #[dbus_proxy] #547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise. Thanks for looking into this. 👍
fc0d7dc
to
a8ce30b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that some nits on the commit logs:
- " zb: Relax type bound on call/call_with_flags" doesn't say what restriction is being lifted.
- " zv: add OwnedStructure" could use a very short rationale.
a8ce30b
to
33548c8
Compare
@danieldg this got off my radar. All review comments addressed? |
I believe so. |
Still the case but ok, no biggie. I forgot to mention, we've started doing emoji prefixes in git commits. Could you please add those? Should be pretty easy with my gimoji tool. :) Then I can merge. |
33548c8
to
928b313
Compare
Deserializing a Structure will result in a Structure that borrows file descriptors and strings from the source; similar to OwnedValue, add a distinct type to allow deserializing without borrows. This is needed to have zbus::Proxy::call return a Structure.
A bound of `for<'d> zvariant::DynamicDeserialize<'d>` on the result type of a call is sufficient to deserialize; use this bound instead of the stricter `DeserializeOwned + zvariant::Type`. Because there is a blanket impl of DynamicDeserialize for any type that implements Type + Deserialize, any call that was previously allowed will still be allowed after this change.
This allows using types that only implement DynamicType in macro-generated proxy functions.
928b313
to
5696d5f
Compare
Fixes: #542