fn send(&mut self, mut ctx: context::Context, request: Req) -> Send<Req, Resp> {
        // Convert the context to the call context.
        ctx.trace_context.parent_id = Some(ctx.trace_context.span_id);
        ctx.trace_context.span_id = SpanId::random(&mut rand::thread_rng());

        let (response_completion, response) = oneshot::channel();
        let cancellation = self.cancellation.clone();
        let request_id = self.next_request_id.fetch_add(1, Ordering::Relaxed);
        Send {
            fut: MapOkDispatchResponse::new(
                MapErrConnectionReset::new(self.to_dispatch.send(DispatchRequest {
                    ctx,
                    request_id,
                    request,
                    response_completion,
                })),
                DispatchResponse {
                    response,
                    complete: false,
                    request_id,
                    cancellation,
                    ctx,
                },
            ),
        }
    }
/// Sends a request to the dispatch task to forward to the server, returning a [`Future`] that
/// resolves when the request is sent (not when the response is received).
Sends a request to the dispatch task to forward to the server, returning a [`Future`] that
resolves when the request is sent (not when the response is received).
Sends a request to the dispatch task to forward to the server returning a [ ` Future ` ] that resolves when the request is sent ( not when the response is received ) .
fn send(&mut self, mut ctx: context::Context, request: Req) -> Send<Req, Resp> {
        // Convert the context to the call context.
        ctx.trace_context.parent_id = Some(ctx.trace_context.span_id);
        ctx.trace_context.span_id = SpanId::random(&mut rand::thread_rng());
        let (response_completion, response) = oneshot::channel();
        let cancellation = self.cancellation.clone();
        let request_id = self.next_request_id.fetch_add(1, Ordering::Relaxed);
        Send {
            fut: MapOkDispatchResponse::new(
                MapErrConnectionReset::new(self.to_dispatch.send(DispatchRequest {
                    ctx,
                    request_id,
                    request,
                    response_completion,
                })),
                DispatchResponse {
                    response,
                    complete: false,
                    request_id,
                    cancellation,
                    ctx,
                },
            ),
        }
    }
fn send ( & mut self , mut ctx : context :: Context , request : Req ) -> Send < Req , Resp > { // Convert the context to the call context. ctx . trace_context . parent_id = Some ( ctx . trace_context . span_id ) ; ctx . trace_context . span_id = SpanId :: random ( & mut rand :: thread_rng ( ) ) ; let ( response_completion , response ) = oneshot :: channel ( ) ; let cancellation = self . cancellation . clone ( ) ; let request_id = self . next_request_id . fetch_add ( 1 , Ordering :: Relaxed ) ; Send { fut : MapOkDispatchResponse :: new ( MapErrConnectionReset :: new ( self . to_dispatch . send ( DispatchRequest { ctx , request_id , request , response_completion , } ) ) , DispatchResponse { response , complete : false , request_id , cancellation , ctx , } , ) , } }
Sends a request to the dispatch task to forward to the server, returning a [`Future`] that
resolves when the request is sent (not when the response is received).
Sends a request to the dispatch task to forward to the server returning a [ ` Future ` ] that resolves when the request is sent ( not when the response is received ) .
&mut self
ctx
context::Context
request
Req
&mut self
ctx
context::Context
request
Req