mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-26 17:02:32 +01:00
16 lines
486 B
Rust
16 lines
486 B
Rust
// Copyright 2018 Google LLC
|
|
//
|
|
// Use of this source code is governed by an MIT-style
|
|
// license that can be found in the LICENSE file or at
|
|
// https://opensource.org/licenses/MIT.
|
|
|
|
#![feature(async_await)]
|
|
|
|
/// This is the service definition. It looks a lot like a trait definition.
|
|
/// It defines one RPC, hello, which takes one arg, name, and returns a String.
|
|
#[tarpc::service]
|
|
pub trait Service {
|
|
/// Returns a greeting for name.
|
|
async fn hello(name: String) -> String;
|
|
}
|