Skip to main content

Module route_handler

Module route_handler 

Source
Expand description

Route component inventory management for incremental route rendering.

These helpers walk the normal render fragment graph. The request-aware path is route-aware but state-agnostic: it follows the active route chain for the current request path, while conservatively traversing if, for, and attribute-template edges without evaluating runtime state.

Structs§

RouteChainEntry
A single entry in the matched route chain, one per nesting level.

Functions§

build_component_index
Build a deterministic component-name → bit-index map from the protocol.
collect_nested_route_params
Walk the fragment graph following matched routes and collect all route parameters from every level of the active route chain.
collect_route_chain
Collect the matched route chain for a request path.
collect_route_chain_json
Collect the matched route chain as a JSON array value.
encode_inventory
Encode an inventory bitfield as a hex string.
filter_needed_components
Filter components against the client’s inventory bitfield using sequential indices. Zero collisions — each component has a unique bit.
get_needed_components
Walk the protocol fragment graph from entry_id and return the names of all components the route needs that are NOT in the client’s inventory.
get_needed_components_for_request
Walk the protocol from the persistent entry_id and return the component templates needed for the current request_path.
parse_inventory
Parse a hex-encoded inventory string into bytes.
render_component_templates
Return compiled templates and CSS for specific components by tag name.
render_partial
Produce a complete JSON partial response for client-side navigation.