Allow objects to be added/removed from method calls
refi64[m]12:
Hey so I'm trying to use zbus for a personal project (on the main branch for that sweet, sweet async server support), but I think I hit a bit of a minor roadblock? It seems there's no way to get a mutable ObjectServer inside of a handler (using
#[zbus(object_server)]
gives me a&ObjectServer
), meaning I can't export a new object from within a handler. In my case, the method is supposed to return the new object handle, so offloading that viatokio::spawn
and callingobject_server_mut
from there or something isn't really an option. Would there be any chance of adding a#[zbus(object_server_mut)]
option or similar? (I could send an MR for it if needed.)
I think the easiest solution is to make ObjectServer::at
a &self
method.