Skip to main content

get_needed_components_for_request

Function get_needed_components_for_request 

Source
pub fn get_needed_components_for_request(
    protocol: &WebUIProtocol,
    entry_id: &str,
    request_path: &str,
    inventory_hex: &str,
) -> (Vec<String>, String)
Expand description

Walk the protocol from the persistent entry_id and return the component templates needed for the current request_path.

The traversal is route-aware but state-agnostic:

  • sibling <route> fragments are pruned to the single best match for the request path
  • nested route groups are traversed recursively via that same rule
  • if, for, and attribute-template edges are still followed conservatively, without evaluating runtime state

Returns (needed_names, updated_inventory_hex).