Skip to main content

map_bounded_ok

Function map_bounded_ok 

Source
pub async fn map_bounded_ok<T, R, F, Fut>(
    items: Vec<T>,
    limit: usize,
    work: F,
) -> Vec<R>
where T: Send + 'static, R: Send + 'static, F: Fn(T) -> Fut + Send + Sync + 'static, Fut: Future<Output = R> + Send + 'static,
Expand description

Convenience: map and unwrap join panics via resume_unwind.

Prefer map_bounded / map_bounded_with when partial failure must be reported.