Skip to main content

map_summary

Function map_summary 

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

Creates a summary generator for map operation results.

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

  • type: "map"
  • 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.