Trait tarpc::server::Serve[][src]

pub trait Serve<Req> {
    type Resp;
    type Fut: Future<Output = Self::Resp>;
    fn serve(self, ctx: Context, req: Req) -> Self::Fut;

    fn method(&self, _request: &Req) -> Option<&'static str> { ... }
}
Expand description

Equivalent to a FnOnce(Req) -> impl Future<Output = Resp>.

Associated Types

Type of response.

Type of response future.

Required methods

Responds to a single request.

Provided methods

Extracts a method name from the request.

Implementors