pub struct GraphSubgraphCall { /* private fields */ }Expand description
One static call-site replacement in a parent graph.
The parent call-site must declare only routes, with exactly one route named for each template return port. Their successors are the explicit return continuations. No executor is registered for the call-site or return ports.
Implementations§
Source§impl GraphSubgraphCall
impl GraphSubgraphCall
Sourcepub const fn once(node_id: NodeId, subgraph: SharedStateSubgraph) -> Self
pub const fn once(node_id: NodeId, subgraph: SharedStateSubgraph) -> Self
Instantiates a template once at the given parent call-site.
Sourcepub fn bounded_loop(
node_id: NodeId,
subgraph: SharedStateSubgraph,
repeat_port: NodeId,
maximum_iterations: u16,
) -> Result<Self, GraphCompositionError>
pub fn bounded_loop( node_id: NodeId, subgraph: SharedStateSubgraph, repeat_port: NodeId, maximum_iterations: u16, ) -> Result<Self, GraphCompositionError>
Instantiates a bounded do/while-style loop.
Selecting repeat_port enters the next copy of the body, or follows the
parent’s matching route on the last iteration. All other ports exit
immediately. The exhaustion route is mandatory even if callers expect
the loop to finish early. The bound is per call-site entry, not per run;
the containing graph’s global superstep ceiling still applies.
§Errors
Rejects zero/oversized iteration bounds and a repeat port absent from the template. Composition additionally caps the entire expanded graph.
Sourcepub fn with_return_routes<I>(
self,
routes: I,
) -> Result<Self, GraphCompositionError>
pub fn with_return_routes<I>( self, routes: I, ) -> Result<Self, GraphCompositionError>
Explicitly binds each return port to a graph-global parent route ID.
By default route names equal port names. Use this when instantiating the same template at several call-sites, since parent route IDs are globally unique. The complete mapping must be bijective; partial overrides and duplicate port/route identities are rejected.