pub fn send_page(&self, status: StatusCode, tmpl: &str, model: tera::Context) -> Result<HttpResponse> {
        info!("rendering {}", tmpl);

        let resp = HttpResponse::build(status).content_type("text/html").body(
            self.template
                .render(tmpl, &model)
                .map_err(|_| ErrorInternalServerError("Error rendering template <error.html>"))?,
        );

        Ok(resp)
    }
/// creates an HttpResponse based on a template
creates an HttpResponse based on a template
creates an HttpResponse based on a template
pub fn send_page(&self, status: StatusCode, tmpl: &str, model: tera::Context) -> Result<HttpResponse> {
        info!("rendering {}", tmpl);
        let resp = HttpResponse::build(status).content_type("text/html").body(
            self.template
                .render(tmpl, &model)
                .map_err(|_| ErrorInternalServerError("Error rendering template <error.html>"))?,
        );
        Ok(resp)
    }
pub fn send_page ( & self , status : StatusCode , tmpl : & str , model : tera :: Context ) -> Result < HttpResponse > { info ! ( " " tmpl ) ; let resp = HttpResponse :: build ( status ) . content_type ( " " ) . body ( self . template . render ( tmpl , & model ) . map_err ( | _ | ErrorInternalServerError ( " " ) ) ? , ) ; Ok ( resp ) }
creates an HttpResponse based on a template
creates an HttpResponse based on a template
&self
status
StatusCode
tmpl
&str
model
tera::Context