Skip to content

generate server traits without provided implementations #444

Open
@tamird

Description

@tamird

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions