Skip to main content

parallel_summary

Function parallel_summary 

Source
pub fn parallel_summary() -> impl Fn(&str) -> String
Expand description

Creates a summary generator for parallel operation results.

The returned closure accepts a serialized JSON array of results and produces a JSON string containing:

  • type: "parallel"
  • totalCount: total number of elements
  • successCount: number of successful elements
  • failureCount: number of failed elements
  • status: "completed" if all succeeded, "partial" if some failed, "failed" if all failed

Each array element is considered a failure if it is an object containing an "error" field. All other elements are counted as successes.