tarpc::server

Function serve

Source
pub fn serve<Req, Resp, Fut, F>(f: F) -> ServeFn<Req, Resp, F>
where F: FnOnce(Context, Req) -> Fut, Fut: Future<Output = Result<Resp, ServerError>>,
Expand description

Creates a Serve wrapper around a FnOnce(context::Context, Req) -> impl Future<Output = Result<Resp, ServerError>>.