Open zeenix opened 3 years ago
Thanks for filing this. This is certainly something we should support and not at all an intentional limitation.
I've been running into this issue. I have an object that sometimes has to farm out to external objects to collate some values. Right now I have to cache a Connection object inside the interface object, which makes using ConnectionBuilder::serve_at impossible without converting the Connection object into something like a OnceCell, which is...pretty inconvenient to say the very least.
@endrift Thanks but I already know about this inconvenience. That's why this issue exists already.
What's needed is for someone to contribute the fix. The good thing is that Interface
is documented as unstable, so we can modify that trait without bumping the major version.
In GitLab by @DataTriny on Nov 1, 2021, 11:14
Hello, To implement some interface properties, I must have access to the connection that received the call in order to build the reply. Here is an example:
This is currently not allowed, and results in an error message:
As stated in the macro documentation, property getters must not take any argument, and setters must only take the new value. It would be nice however, if arguments marked with
#[zbus(...)]
were allowed.