Skip to main content

render_partial

Function render_partial 

Source
pub fn render_partial(
    protocol: &WebUIProtocol,
    state: Value,
    entry_id: &str,
    request_path: &str,
    inventory_hex: &str,
) -> Value
Expand description

Produce a complete JSON partial response for client-side navigation.

Combines route templates, inventory, and matched route chain into a single JSON value. Host servers include this directly in their response alongside the application state.

Returns a serde_json::Value object with fields:

  • state: the application state passed through
  • templates: array of f-template HTML strings the client needs
  • inventory: updated hex bitmask
  • path: the request path
  • chain: matched route chain array