use tarpc::context::Context;
pub const SERVICE_NAME: &str = "echo";
#[tarpc::service]
pub trait EchoRPC {
async fn echo(name: String) -> String;
}
#[derive(Clone)]
pub struct EchoRPCServer;
#[tarpc::server]
impl EchoRPC for EchoRPCServer {
async fn echo(self, _: Context, text: String) -> String {
text
}
}