pub fn error(
title: &str,
error: Template<'_, '_>,
version: &String,
description: String,
status_code: StatusCode,
) -> HttpResponseExpand description
Frames a custom response into an error page.
§Arguments
title- Title to be displayed in the error page.error- Jinja template for the error page.version- Application’s version in the title tag of the webpage.description- Description to be displayed in the error page.status_code- Status code of the response.
§Returns
Returns an HTTPResponse with the appropriate status code formatted as HTML.