pub type WebUIProtocol = WebUiProtocol;Aliased Type§
pub struct WebUIProtocol {
pub fragments: HashMap<String, FragmentList>,
pub tokens: Vec<String>,
pub components: HashMap<String, ComponentData>,
pub css_strategy: i32,
pub initial_state_strategy: i32,
pub module_preloads: Vec<String>,
pub component_render_css: String,
pub style_closures: HashMap<String, ComponentStyleClosure>,
pub style_chunks: Vec<StyleChunk>,
pub component_asset_style_preloads: Vec<ComponentAssetStylePreload>,
}Fields§
§fragments: HashMap<String, FragmentList>§tokens: Vec<String>Sorted, deduplicated CSS custom property names used across all components and entry page styles (e.g., “colorBrandBackground”, “spacingMedium”). Only usage via var(–name) is included; local definitions are excluded.
components: HashMap<String, ComponentData>Per-component data keyed by tag name (f-template + CSS).
css_strategy: i32Build-wide CSS delivery strategy. Determines how compiled component resources are installed in each CSS tree.
initial_state_strategy: i32Whether initial SSR metadata contains full state or WebUI component projection. Partial-navigation state remains component-driven.
module_preloads: Vec<String>Ready-to-write <link rel="modulepreload"> hrefs for the shared chunks
that the page’s critical module entries statically import, in the exact
order they must be emitted (largest chunk first).
These chunks are named only inside the entry’s own bytes, so the browser’s preload scanner cannot discover them until it has downloaded and parsed the entry. Emitting them as hints removes that serialization.
Order is load-bearing: preloads are issued in document order over one connection, so a small chunk ahead of a large one delays the long pole. The compiler resolves and sorts these at build time so the handler writes them verbatim with no per-request work.
component_render_css: StringBuild-generated document-level rules for component rendering policies. Empty when no component opts into lazy rendering.
style_closures: HashMap<String, ComponentStyleClosure>Ordered, deduplicated component style resource tags for each Document or component-root CSS tree entry point.
style_chunks: Vec<StyleChunk>Bundled stylesheets in global cascade order. Empty unless the build enabled CSS bundling, in which case every component that owns a style resource belongs to exactly one chunk and handlers deliver chunks instead of individual component resources.
component_asset_style_preloads: Vec<ComponentAssetStylePreload>Build-generated eager metadata for static component asset roots.
Entries are sorted by root tag. Builds without component assets omit the field from the wire.