deluge 0.2.1

A highly concurrent stream library driving the underlying futures either concurrently or in parallel to process streaming operations as quickly as possible.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::future::Future;

/// A stream of unevaluated futures eventually returning an element of the stream
///
/// An executor such as `collect` or `collect_par` controls how these futures are evaluated.
/// If a `None` is returned for a given element of a collection, it means that
/// element was filtered out earlier in the processing chain and should be omitted.
///
/// If `None` is returned from the call to `next`, the Deluge has ran out of items to provide.
/// Calling `next` again will be unsafe and may lead to panics.
pub trait Deluge {
    type Item: Send;
    type Output<'x>: Future<Output = Option<Self::Item>> + 'x
    where
        Self: 'x;

    fn next(&self) -> Option<Self::Output<'_>>;
}