pub trait World: Sized {
type HelloFut: Future<Output = String>;
fn hello(self, context: Context, name: String) -> Self::HelloFut;
fn serve(self) -> ServeWorld<Self> { ... }
}Expand description
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.
Required Associated Types
The response future returned by World::hello.
Required Methods
Provided Methods
fn serve(self) -> ServeWorld<Self>
fn serve(self) -> ServeWorld<Self>
Returns a serving function to use with InFlightRequest::execute.