zng::task

Function any_ok

Source
pub async fn any_ok<Ok, Err, F>(
    futures: impl IntoIterator<Item = F>,
) -> Result<Ok, Vec<Err>>
where F: IntoFuture<Output = Result<Ok, 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!.