zng_task

Function any_ok

Source
pub async fn any_ok<Ok, Err, F: IntoFuture<Output = Result<Ok, Err>>>(
    futures: impl IntoIterator<Item = F>,
) -> Result<Ok, Vec<Err>>
Expand description

A future that awaits on all futures at the same time and returns when any future is Ok(_) or all are Err(_).

This is the dynamic version of all_some!.