Open edevil opened 1 year ago
For a real-world example where this matters, compare request()
and startRequest()
in http-over-capnp.capnp
.
The introduction of setPipeline()
made it possible to simplify this interface (request()
being the new, simpler version, where startRequest()
was what we needed before). However, it's currently not possible to implement request()
in Rust.
Yeah, this should be possible. I took some some small first steps here: https://github.com/capnproto/capnproto-rust/pull/380
Probably this will require a version bump, because we will need to change the signature of ClientHook.call()
to additionally return a pipeline, and we will need to modify ResultsHook
too.
We require this feature for our project. Unfortunately, #380 contains only stubs and minimal direction on what actually needs to happen to implement this feature. Would it be possible for @dwrensha to provide a more detailed explanation of everything that needs to change for this to be implemented correctly? I can then try my hand at providing a PR that implements this.
Context: https://github.com/capnproto/capnproto/pull/1131
In the c++ capnproto lib this feature was added that allows, as @kentonv says:
Would it be possible to support this in capnproto-rust as well?
Thanks.