fn html_response(body: &str, can_gzip: bool) -> Result<Response, Error> {
    let mut response = Response::new();
    response.set_status(StatusCode::Ok);
    response.headers_mut().set(ContentType(TEXT_HTML_UTF_8));
    set_response_body(&mut response, body.as_bytes(), can_gzip)?;
    Ok(response)
}
/// Converts an HTML body string into a hyper response.
Converts an HTML body string into a hyper response.
Converts an HTML body string into a hyper response .
fn html_response(body: &str, can_gzip: bool) -> Result<Response, Error> {
    let mut response = Response::new();
    response.set_status(StatusCode::Ok);
    response.headers_mut().set(ContentType(TEXT_HTML_UTF_8));
    set_response_body(&mut response, body.as_bytes(), can_gzip)?;
    Ok(response)
}
fn html_response ( body : & str , can_gzip : bool ) -> Result < Response , Error > { let mut response = Response :: new ( ) ; response . set_status ( StatusCode :: Ok ) ; response . headers_mut ( ) . set ( ContentType ( TEXT_HTML_UTF_8 ) ) ; set_response_body ( & mut response , body . as_bytes ( ) , can_gzip ) ? ; Ok ( response ) }
Converts an HTML body string into a hyper response.
Converts an HTML body string into a hyper response .
body
&str
can_gzip
bool
body
&str
can_gzip
bool