Attribute Macro tarpc::service[][src]

#[service]

The main macro that creates RPC services.

Rpc methods are specified, mirroring trait syntax:

#[tarpc::service]
trait Service {
/// Say hello
async fn hello(name: String) -> String;
}

Attributes can be attached to each rpc. These attributes will then be attached to the generated service traits’ corresponding fns, as well as to the client stubs’ RPCs.

The following items are expanded in the enclosing module: