Trait tarpc::rpc::client::Client [−][src]
Sends multiplexed requests to, and receives responses from, a server.
Associated Types
type Response
[src][−]
The response type.
type Future: Future<Output = Result<Self::Response>> + 'a
[src][−]
The future response.
Required methods
fn call(&'a mut self, ctx: Context, request: Req) -> Self::Future
[src][−]
Initiates a request, sending it to the dispatch task.
Returns a Future
that resolves to this client and the future response
once the request is successfully enqueued.
Provided methods
fn map_response<F, R>(self, f: F) -> MapResponse<Self, F> where
F: FnMut(Self::Response) -> R,
Self: Sized,
[src][−]
F: FnMut(Self::Response) -> R,
Self: Sized,
Returns a Client that applies a post-processing function to the returned response.
fn with_request<F, Req2>(self, f: F) -> WithRequest<Self, F> where
F: FnMut(Req2) -> Req,
Self: Sized,
[src][−]
F: FnMut(Req2) -> Req,
Self: Sized,
Returns a Client that applies a pre-processing function to the request.
Implementors
impl<'a, C, F, Req, Req2, Resp> Client<'a, Req2> for WithRequest<C, F> where
C: Client<'a, Req, Response = Resp>,
F: FnMut(Req2) -> Req,
[src][+]
C: Client<'a, Req, Response = Resp>,
F: FnMut(Req2) -> Req,
impl<'a, C, F, Req, Resp, Resp2> Client<'a, Req> for MapResponse<C, F> where
C: Client<'a, Req, Response = Resp>,
F: FnMut(Resp) -> Resp2 + 'a,
[src][+]
C: Client<'a, Req, Response = Resp>,
F: FnMut(Resp) -> Resp2 + 'a,
impl<'a, Req, Resp> Client<'a, Req> for Channel<Req, Resp> where
Req: 'a,
Resp: 'a,
[src][+]
Req: 'a,
Resp: 'a,