Expand description
HTML view helpers: reverse routing, assets, partials, and document composition.
Escape stays in serenade_form; this crate re-exports it for one import surface.
Document composition is engine-neutral; template engines can integrate without
becoming mandatory dependencies of this crate. The optional leptos-ssr feature
renders complete documents under a request-scoped Leptos owner and injects managed
metadata. The leptos-client feature exposes the head root and lifecycle components
used by CSR/hydrated apps. Compatible AOT compilers can target these components
without becoming dependencies of this crate.
Structs§
- Asset
Config - Base path for application assets (default
/assets). - Default
Document Template - The framework’s default document template.
- Document
- Application-provided head and body ready for document composition.
- Document
Assets - Build-generated markup delivered with every rendered document.
- Document
Parts - Head and body inputs supplied to a document template.
- Rendered
Document - A complete HTML document ready for HTTP or static-file delivery.
- Static
Document Writer - Writes complete documents to route-derived
index.htmlfiles. - Trunk
Asset Manifest - Assets produced by Trunk for one frontend build.
- Trunk
Asset Reference - One external asset emitted by Trunk.
- Trunk
Document Asset - Markup generated by one Trunk asset pipeline, as written to Trunk’s HTML.
- Trunk
Preload Reference - One preload generated for a Rust/WASM bundle.
- Trunk
Wasm Bundle - Rust/WASM runtime bundle and initialization information.
- View
Error - Error from view helpers such as
crate::asset.
Constants§
- STATIC_
OUTPUT_ DIR_ ENV - Environment variable set by
serenade-ssgfor the static output directory. - TRUNK_
ASSET_ MANIFEST_ ENV - Environment variable set by Serenade mode commands with the manifest path.
- TRUNK_
ASSET_ MANIFEST_ FILE - Filename emitted by Trunk for its build asset manifest.
- TRUNK_
DIST_ DIRECTORY_ ENV - Environment variable set by
serenade-universalwith the frontend output directory.
Traits§
- Document
Template - A template engine’s document-level composition boundary.
Functions§
- asset
- Builds an asset URL under the default
/assetsbase. - escape_
attr - Escapes a value for use inside a double-quoted HTML attribute.
- escape_
html - Escapes text for HTML body content (
&,<,>,",'). - partial
- Runs
bodyand returns its HTML fragment (named nesting for builders). - path
- Builds a path for the named route (Twig
path()analogue). - version
- Compile-time crate version for diagnostics.