Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate server traits without provided implementations #444

Open
tamird opened this issue Oct 31, 2023 · 0 comments
Open

generate server traits without provided implementations #444

tamird opened this issue Oct 31, 2023 · 0 comments

Comments

@tamird
Copy link
Contributor

tamird commented Oct 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant