Struct perseus::error_pages::ErrorPages[][src]

pub struct ErrorPages<G: GenericNode> { /* 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.

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.

Gets the template for a page without rendering it into a container.

Renders the appropriate error page to the given DOM container.

Hydrates the appropriate error page to the given DOM container. This is used for when an error page is rendered by the server and then needs interactivity.

Renders the error page to a string. This should then be hydrated on the client-side.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.