pub(crate) fn new(request_body: Body) -> (Self, RequestHandlerFuture) {
        let (sender, receiver) = crossbeam_channel::bounded(1);
        let shared = Arc::new(Shared {
            id: AtomicCell::new(usize::max_value()),
            waker: AtomicWaker::default(),
            completed: AtomicCell::new(false),
            future_dropped: AtomicCell::new(false),
            response_body_dropped: AtomicCell::new(false),
        });
        let (response_body_reader, response_body_writer) = pipe::pipe();

        (
            Self {
                sender: Some(sender),
                shared: shared.clone(),
                request_body,
                request_body_waker: None,
                response_status_code: None,
                response_version: None,
                response_headers: http::HeaderMap::new(),
                response_body_writer,
                response_body_waker: None,
                metrics: None,
                handle: ptr::null_mut(),
            },
            RequestHandlerFuture {
                receiver,
                shared,
                response_body_reader: Some(response_body_reader),
            },
        )
    }
/// Create a new request handler and an associated response future.
Create a new request handler and an associated response future.
Create a new request handler and an associated response future .
pub(crate) fn new(request_body: Body) -> (Self, RequestHandlerFuture) {
        let (sender, receiver) = crossbeam_channel::bounded(1);
        let shared = Arc::new(Shared {
            id: AtomicCell::new(usize::max_value()),
            waker: AtomicWaker::default(),
            completed: AtomicCell::new(false),
            future_dropped: AtomicCell::new(false),
            response_body_dropped: AtomicCell::new(false),
        });
        let (response_body_reader, response_body_writer) = pipe::pipe();
        (
            Self {
                sender: Some(sender),
                shared: shared.clone(),
                request_body,
                request_body_waker: None,
                response_status_code: None,
                response_version: None,
                response_headers: http::HeaderMap::new(),
                response_body_writer,
                response_body_waker: None,
                metrics: None,
                handle: ptr::null_mut(),
            },
            RequestHandlerFuture {
                receiver,
                shared,
                response_body_reader: Some(response_body_reader),
            },
        )
    }
pub ( crate ) fn new ( request_body : Body ) -> ( Self , RequestHandlerFuture ) { let ( sender , receiver ) = crossbeam_channel :: bounded ( 1 ) ; let shared = Arc :: new ( Shared { id : AtomicCell :: new ( usize :: max_value ( ) ) , waker : AtomicWaker :: default ( ) , completed : AtomicCell :: new ( false ) , future_dropped : AtomicCell :: new ( false ) , response_body_dropped : AtomicCell :: new ( false ) , } ) ; let ( response_body_reader , response_body_writer ) = pipe :: pipe ( ) ; ( Self { sender : Some ( sender ) , shared : shared . clone ( ) , request_body , request_body_waker : None , response_status_code : None , response_version : None , response_headers : http :: HeaderMap :: new ( ) , response_body_writer , response_body_waker : None , metrics : None , handle : ptr :: null_mut ( ) , } , RequestHandlerFuture { receiver , shared , response_body_reader : Some ( response_body_reader ) , } , ) }
Create a new request handler and an associated response future.
Create a new request handler and an associated response future .
request_body
Body