Struct perseus::shell::ErrorPages [−][src]
pub struct ErrorPages { /* fields omitted */ }
Expand description
A type alias for the HashMap
the user should provide for error pages.
Implementations
Creates a new definition of error pages with just a fallback.
Adds a new page for the given status code. If a page was already defined for the given code, it will be updated by the mechanics of
the internal HashMap
.
Renders the appropriate error page to the given DOM container.
pub fn get_template_for_page(
&self,
url: &str,
status: &u16,
err: &str
) -> SycamoreTemplate<DomNode>
pub fn get_template_for_page(
&self,
url: &str,
status: &u16,
err: &str
) -> SycamoreTemplate<DomNode>
Gets the template for a page without rendering it into a container.