Skip to main content

run_collect

Function run_collect 

Source
pub async fn run_collect<I, O, F, Fut>(
    rx: UnboundedReceiver<I>,
    parallelism: usize,
    stage: F,
) -> Vec<O>
where I: Send + 'static, O: Send + 'static, F: FnMut(I) -> Fut + Send + 'static, Fut: Future<Output = O> + Send + 'static,
Expand description

Run a single-stage pipeline end-to-end: pull from rx, apply the async stage with the given parallelism, and collect every output into a Vec. The future completes when every sender is dropped upstream.