Trait timely::dataflow::operators::inspect::Inspect[][src]

pub trait Inspect<G: Scope, D: Data> {
    fn inspect_batch(
        &self,
        func: impl FnMut(&G::Timestamp, &[D]) + 'static
    ) -> Stream<G, D>; fn inspect(
        &self,
        func: impl FnMut(&D) + 'static
    ) -> Stream<G, D> { ... }
fn inspect_time(
        &self,
        func: impl FnMut(&G::Timestamp, &D) + 'static
    ) -> Stream<G, D> { ... } }

Methods to inspect records and batches of records on a stream.

Required Methods

Runs a supplied closure on each observed data batch (time and data slice).

#Examples

use timely::dataflow::operators::{ToStream, Map, Inspect};

timely::example(|scope| {
    (0..10).to_stream(scope)
           .inspect_batch(|t,xs| println!("seen at: {:?}\t{:?} records", t, xs.len()));
});

Provided Methods

Runs a supplied closure on each observed data element.

#Examples

use timely::dataflow::operators::{ToStream, Map, Inspect};

timely::example(|scope| {
    (0..10).to_stream(scope)
           .inspect(|x| println!("seen: {:?}", x));
});

Runs a supplied closure on each observed data element and associated time.

#Examples

use timely::dataflow::operators::{ToStream, Map, Inspect};

timely::example(|scope| {
    (0..10).to_stream(scope)
           .inspect_time(|t, x| println!("seen at: {:?}\t{:?}", t, x));
});

Implementors