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§

source§

impl Debug for FunctionalPluginHtmlShellActions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FunctionalPluginHtmlShellActions

source§

fn default() -> FunctionalPluginHtmlShellActions

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.