pub fn spawn(
        req: impl Future<Output = Result<Response<Body>, Error>> + Send + 'static,
    ) -> Self {
        let (sender, receiver) = oneshot::channel();
        tokio::task::spawn(async move { sender.send(req.await) });
        Self { receiver }
    }
/// Create a `PendingRequest` for the given request by spawning a Tokio task to drive sending
/// and receiving to completion.
Create a `PendingRequest` for the given request by spawning a Tokio task to drive sending
and receiving to completion.
Create a ` PendingRequest ` for the given request by spawning a Tokio task to drive sending and receiving to completion .
pub fn spawn(
        req: impl Future<Output = Result<Response<Body>, Error>> + Send + 'static,
    ) -> Self {
        let (sender, receiver) = oneshot::channel();
        tokio::task::spawn(async move { sender.send(req.await) });
        Self { receiver }
    }
pub fn spawn ( req : impl Future < Output = Result < Response < Body > , Error > > + Send + ' static , ) -> Self { let ( sender , receiver ) = oneshot :: channel ( ) ; tokio :: task :: spawn ( async move { sender . send ( req . await ) } ) ; Self { receiver } }
Create a `PendingRequest` for the given request by spawning a Tokio task to drive sending
and receiving to completion.
Create a ` PendingRequest ` for the given request by spawning a Tokio task to drive sending and receiving to completion .
req
impl Future<Output = Result<Response<Body>, Error>> + Send + 'static
req
impl Future<Output = Result<Response<Body>, Error>> + Send + 'static