pub struct FunctionalPluginSettingsActions<G: Html> {
    pub add_static_aliases: FunctionalPluginAction<(), HashMap<String, String>>,
    pub add_templates: FunctionalPluginAction<(), Vec<Template<G>>>,
    pub add_error_pages: FunctionalPluginAction<(), HashMap<u16, ErrorPageTemplate<G>>>,
    pub html_shell_actions: FunctionalPluginHtmlShellActions,
}
Expand description

Functional actions that pertain to altering the settings exported from PerseusApp.

Fields

add_static_aliases: FunctionalPluginAction<(), HashMap<String, String>>

Adds additional static aliases. Note that a static alias is a mapping of a URL path to a filesystem path (relative to the project root). These will be vetted to ensure they don’t access anything outside the project root for security reasons. If they do, the user’s app will not run. Note that these have the power to override the user’s static aliases.

add_templates: FunctionalPluginAction<(), Vec<Template<G>>>

Adds additional templates. These will be applied to both the templates map and the templates list (separate entities), and they must be generic about Sycamore rendering backends. Note that these have the power to override the user’s templates.

add_error_pages: FunctionalPluginAction<(), HashMap<u16, ErrorPageTemplate<G>>>

Adds additional error pages. This must return a map of HTTP status codes to erro page templates. Note that these have the power to override the user’s error pages.

html_shell_actions: FunctionalPluginHtmlShellActions

Actions pertaining to the HTML shell, in their own category for cleanliness (as there are quite a few).

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.