Open ranfdev opened 1 year ago
This is somewhat similar to https://github.com/capnproto/capnproto-rust/issues/87, which is about calling RPC methods on self
. Off the top of my head, I'm not sure how to make all the types and traits work out, but it does seem like it should be possible.
Capnproto interfaces are translated to traits with methods taking
&mut self
. So, from my understanding, there's an event loop taking the ownership ofself
, which receives RPC calls and then executes the correct methods.Can we add a way to schedule a closure on that event loop, to get access to
&mut self
?Something like this: