Struct perseus::plugins::FunctionalPluginHtmlShellActions
source · [−]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
sourceimpl Default for FunctionalPluginHtmlShellActions
impl Default for FunctionalPluginHtmlShellActions
sourcefn default() -> FunctionalPluginHtmlShellActions
fn default() -> FunctionalPluginHtmlShellActions
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for FunctionalPluginHtmlShellActions
impl Send for FunctionalPluginHtmlShellActions
impl !Sync for FunctionalPluginHtmlShellActions
impl Unpin for FunctionalPluginHtmlShellActions
impl !UnwindSafe for FunctionalPluginHtmlShellActions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more