Trait dataflow::operator::StreamExt[][src]

pub trait StreamExt<G, D1> where
    D1: Data,
    G: Scope
{ fn unary_fallible<D2, E, B, P>(
        &self,
        pact: P,
        name: &str,
        constructor: B
    ) -> (Stream<G, D2>, Stream<G, E>)
    where
        D2: Data,
        E: Data,
        B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> Box<dyn FnMut(&mut InputHandle<G::Timestamp, D1, P::Puller>, &mut OutputHandle<'_, G::Timestamp, D2, Tee<G::Timestamp, D2>>, &mut OutputHandle<'_, G::Timestamp, E, Tee<G::Timestamp, E>>) + 'static>,
        P: ParallelizationContract<G::Timestamp, D1>
;
fn flat_map_fallible<D2, E, I, L>(
        &self,
        name: &str,
        logic: L
    ) -> (Stream<G, D2>, Stream<G, E>)
    where
        D2: Data,
        E: Data,
        I: IntoIterator<Item = Result<D2, E>>,
        L: FnMut(D1) -> I + 'static
;
fn pass_through(&self, name: &str) -> Stream<G, (D1, G::Timestamp, Diff)>; fn map_fallible<D2, E, L>(
        &self,
        name: &str,
        logic: L
    ) -> (Stream<G, D2>, Stream<G, E>)
    where
        D2: Data,
        E: Data,
        L: FnMut(D1) -> Result<D2, E> + 'static
, { ... } }
Expand description

Extension methods for timely Streams.

Required methods

Like timely::dataflow::operators::generic::operator::Operator::unary, but the logic function can handle failures.

Creates a new dataflow operator that partitions its input stream by a parallelization strategy pact and repeatedly invokes logic, the function returned by the function passed as constructor. The logic function can read to the input stream and write to either of two output streams, where the first output stream represents successful computations and the second output stream represents failed computations.

Like timely::dataflow::operators::map::Map::flat_map, but logic is allowed to fail. The first returned stream will contain the successful applications of logic, while the second returned stream will contain the failed applications.

Take a Timely stream and convert it to a Differential stream, where each diff is “1” and each time is the current Timely timestamp.

Provided methods

Like timely::dataflow::operators::map::Map::map, but logic is allowed to fail. The first returned stream will contain the successful applications of logic, while the second returned stream will contain the failed applications.

Implementations on Foreign Types

Implementors