Skip to main content

scripted_route_node

Function scripted_route_node 

Source
pub fn scripted_route_node<State, Update, I, R, N>(
    routes: I,
) -> impl Fn(State, NodeContext) -> NodeFuture<Update> + Send + Sync + 'static
where State: Send + 'static, Update: Send + 'static, I: IntoIterator<Item = R>, R: IntoIterator<Item = N>, N: Into<NodeId>,
Expand description

A node that routes via a fixed queue of goto target-sets, one set per activation (saturating the last set once drained).

Each item is the set of nodes to activate next; route to END to end a branch. An empty queue makes every activation fail with TinyAgentsError::Graph.