#[unsafe(no_mangle)]pub unsafe extern "C" fn net_predicate_aggregate_debug_report(
predicate_json: *const c_char,
contexts_json: *const c_char,
out_report_json: *mut *mut c_char,
out_report_len: *mut usize,
) -> c_intExpand description
Run predicate against every entry in contexts_json and
write a PredicateDebugReport to the out-param. Mirrors
PredicateDebugReport::from_evaluations(pred, contexts).
Inputs (NUL-terminated UTF-8 JSON):
predicate_jsonโ wire-formatPredicateWire.contexts_jsonโ JSON array of evaluation contexts:[{"tags": [...], "metadata": {...}}, ...]. Each context contributes one corpus row.
Outputs:
out_report_json/out_report_lenโ the report JSON. Free withnet_free_string. Wire shape:
{
"total_candidates": <usize>,
"matched": <usize>,
"clause_stats": [
{"label": "<debug-label>", "evaluated": <usize>, "matched": <usize>},
...
]
}clause_stats is sorted by label (the substrate uses
BTreeMap, so iteration is in label order).
Returns 0 on success, NetError::* (negative) on parse /
null-pointer failure.
ยงSafety
All input pointers MUST point at NUL-terminated UTF-8 strings.
On success the caller owns the report buffer and frees it via
net_free_string.