pub struct FunctionalPluginHtmlShellActions {
    pub add_to_head_before_boundary: FunctionalPluginAction<(), Vec<String>>,
    pub add_to_scripts_before_boundary: FunctionalPluginAction<(), Vec<String>>,
    pub add_to_head_after_boundary: FunctionalPluginAction<(), Vec<String>>,
    pub add_to_scripts_after_boundary: FunctionalPluginAction<(), Vec<String>>,
    pub add_to_before_content: FunctionalPluginAction<(), Vec<String>>,
    pub add_to_after_content: FunctionalPluginAction<(), Vec<String>>,
}
Expand description

Functional actions that pertain to the HTML shell.

IMPORTANT: The HTML shell’s <head> contains an interpolation boundary, after which all content is wiped between page loads. If you want the code you add (HTML or JS) to persist between pages (which you usually will), make sure to use the ..._before_boundary actions.

Fields

add_to_head_before_boundary: FunctionalPluginAction<(), Vec<String>>

Adds to the additional HTML content in the document <head> before the interpolation boundary.

add_to_scripts_before_boundary: FunctionalPluginAction<(), Vec<String>>

Adds JS code (which will be placed into a <script> block) before the interpolation boundary.

add_to_head_after_boundary: FunctionalPluginAction<(), Vec<String>>

Adds to the additional HTML content in the document <head> after the interpolation boundary.

add_to_scripts_after_boundary: FunctionalPluginAction<(), Vec<String>>

Adds Js code (which will places into a <script> block) after the interpolation boundary.

add_to_before_content: FunctionalPluginAction<(), Vec<String>>

Adds arbitrary HTML to the document <body> before the Perseus app markup. This will persist across all pages of the app.

add_to_after_content: FunctionalPluginAction<(), Vec<String>>

Adds arbitrary HTML to the document <body> after the Perseus app markup. This will persist across all pages of the app.

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.