mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-02-23 15:49:54 +01:00
16 lines
244 B
Rust
16 lines
244 B
Rust
#[tarpc::service]
|
|
trait World {
|
|
async fn hello(name: String) -> String;
|
|
}
|
|
|
|
struct HelloServer;
|
|
|
|
#[tarpc::server]
|
|
impl World for HelloServer {
|
|
fn hello(name: String) -> String {
|
|
format!("Hello, {}!", name)
|
|
}
|
|
}
|
|
|
|
fn main() {}
|