pub struct ErrorPages<G: Html> { /* private fields */ }
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.

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. This differs from .add_page() in that it takes an Rc, which is useful for plugins.

Renders the error page to a string. This should then be hydrated on the client-side. No reactive scope is provided to this function, it uses an internal one.

Renders the error page to a string, using the given reactive scope. Note that this function is not used internally, and .render_to_string() should cover all uses. This is included for completeness.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.