Skip to main content

map_concurrent

Function map_concurrent 

Source
pub async fn map_concurrent<I, F, Fut, T>(
    items: I,
    limit: usize,
    f: F,
) -> Result<Vec<T>, FaucetError>
where I: IntoIterator, F: FnMut(I::Item) -> Fut, Fut: Future<Output = Result<T, FaucetError>>,
Expand description

Run f on every item with at most limit in flight (0 is treated as 1) and return the results in input order. Stops at, and returns, the first error.