handle_request

Function handle_request 

Source
pub async fn handle_request<I, O, E, F, Fut, B, Err>(
    stdin: I,
    stdout: O,
    stderr: E,
    request_fn: F,
) -> Result<(), Error>
where I: AsyncRead + Unpin + 'static, O: AsyncWrite + Unpin, E: AsyncWrite + Unpin, F: FnOnce(Request<CgiIncoming<I>>, E) -> Fut, Fut: Future<Output = Result<Response<B>, Err>>, B: Body, B::Data: AsRef<[u8]> + Send + 'static, B::Error: Into<Error>, Err: Into<Error>,
Available on crate feature server only.
Expand description

Handles a CGI request by converting it to an HTTP request, invoking the provided request function, and then converting the HTTP response back to a CGI response.