Struct perseus::plugins::FunctionalPluginSettingsActions
source · [−]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
sourceimpl<G: Debug + Html> Debug for FunctionalPluginSettingsActions<G>
impl<G: Debug + Html> Debug for FunctionalPluginSettingsActions<G>
Auto Trait Implementations
impl<G> !RefUnwindSafe for FunctionalPluginSettingsActions<G>
impl<G> Send for FunctionalPluginSettingsActions<G>
impl<G> !Sync for FunctionalPluginSettingsActions<G>
impl<G> Unpin for FunctionalPluginSettingsActions<G>
impl<G> !UnwindSafe for FunctionalPluginSettingsActions<G>
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