pub fn flatten_join_named_results<T, E1, E2, S, R>(
task_results: R,
) -> Result<(), BridgeError>Expand description
Collects all errors (both outer and inner) from named task results and returns a combined error if any task failed.
This function is useful when you have multiple async tasks (e.g., from tokio::spawn) and want to
see all errors if multiple tasks fail, rather than just the first error.
§Parameters
task_results: Iterator of tuples containing (task_name, Result<Result<T, E1>, E2>)task_name: A string-like identifier for the task (used in error messages)- The nested Result represents:
Result<T, E1>is the task’s result,E2is typically aJoinError
§Returns
Ok(())if all tasks completed successfullyErr(BridgeError)with a combined error message listing all failures