[]Trait service::Service

pub trait Service: Clone + Send + 'static {
type HelloFut: Future__<Output = String> + Send;
    fn hello(self, ctx: Context, name: String) -> Self::HelloFut;
}

Defines the RPC service. The additional trait bounds are required so that services can multiplex requests across multiple tasks, potentially on multiple threads.

Associated Types

type HelloFut: Future__<Output = String> + Send

The type of future returned by hello.

Loading content...

Required methods

fn hello(self, ctx: Context, name: String) -> Self::HelloFut

Returns a greeting for name.

Loading content...

Implementors

Loading content...