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

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

Basically a Fn(Req) -> impl Future<Output = Resp>;

Associated Types

type Resp[src][]

Type of response.

type Fut: Future<Output = Self::Resp>[src][]

Type of response future.

Required methods

fn serve(self, ctx: Context, req: Req) -> Self::Fut[src][]

Responds to a single request.

Implementors

impl<Req, Resp, Fut, F> Serve<Req> for F where
    F: FnOnce(Context, Req) -> Fut + Clone,
    Fut: Future<Output = Resp>, 
[src][+]

type Resp = Resp

type Fut = Fut

impl<S> Serve<BanksRequest> for ServeBanks<S> where
    S: Banks