Closed zeenix closed 4 months ago
In GitLab by @ids1024 on Jan 12, 2022, 01:21
How would such a trait fit with async use cases? That would require different function signatures for methods, and async
trait methods are still not supported by Rust.
We already support async traits through the async-trait
crate. Both proxy and interface methods are async in 2.0 essentially.
Since #225 turned out to be not so easy (especially if we do it in such a way that it paves the way to solve this), I think the best way forward is to achieve this though dbus_interface
gaining the ability to generate the dbus_proxy
for you. That way you've far less typing involved and this can be done w/o breaking API though introduction of new macro attribute(s).
I believe this would be the best way forward here.
A lot of times, codebases have both the service and client side so it'd be ideal with the API declaration (i-e the trait declaration given to the
dbus_proxy
macro) could be shared betweendbus_proxy
anddbus_interface
. Something like:Related: #118, #225.