capnproto-rust icon indicating copy to clipboard operation
capnproto-rust copied to clipboard

generate server traits without provided implementations

Open tamird opened this issue 2 years ago • 0 comments

Presently when one defines a capnproto RPC, one gets generated traits like this:

      pub trait Server<>   {
        fn do_stuff(&mut self, _: DoStuffParams<>, _: DoStuffResults<>) -> ::capnp::capability::Promise<(), ::capnp::Error> { ::capnp::capability::Promise::err(::capnp::Error::unimplemented("method handle::Server::do_stuff not implemented".to_string())) }
      }

this means that when adding new RPC methods the rust compiler is unable to help discover missing implementations.

It would be nice to opt out of these provided methods so that runtime errors are promoted to compile-time.

tamird avatar Oct 31 '23 20:10 tamird