Skip to main content

resolve_execution_order

Function resolve_execution_order 

Source
pub fn resolve_execution_order(
    operations: &[BatchOperation],
) -> Result<ExecutionOrder, Error>
Expand description

Validates the batch operations and returns a topological execution order.

§Validation rules

  1. Every operation that uses capture, capture_append, or depends_on must have an id.
  2. Every depends_on reference must point to an existing operation id.
  3. Implicit dependencies from {{variable}} usage are inferred from capture/capture_append.
  4. The resulting dependency graph must be acyclic.

§Errors

Returns an error if any validation rule is violated or a cycle is detected.