Skip to main content

WebUIProtocol

Type Alias WebUIProtocol 

Source
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 dom_strategy: i32,
    pub initial_state_strategy: i32,
    pub module_preloads: Vec<String>,
    pub streaming_boundaries: HashMap<String, StreamingBoundaryList>,
    pub component_render_css: String,
}

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: i32

Build-wide CSS delivery strategy. Determines how the handler emits CSS-related tags in for components with css_href.

§dom_strategy: i32

Build-wide DOM encapsulation strategy. Combined with css_strategy to decide preload vs stylesheet emission.

§initial_state_strategy: i32

Whether 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.

§streaming_boundaries: HashMap<String, StreamingBoundaryList>

Free-form values keyed by entry fragment and stored in declaration order. Hosts resolve a name once to its zero-based BoundaryId; names never reach the rendered HTML response.

§component_render_css: String

Build-generated document-level rules for component rendering policies. Empty when no component opts into lazy rendering.