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

fn inspect_batch(
    &self,
    func: impl FnMut(&G::Timestamp, &[D]) + 'static
) -> Stream<G, D>
[src]

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()));
});
Loading content...

Provided methods

fn inspect(&self, func: impl FnMut(&D) + 'static) -> Stream<G, D>[src]

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));
});

fn inspect_time(
    &self,
    func: impl FnMut(&G::Timestamp, &D) + 'static
) -> Stream<G, D>
[src]

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));
});
Loading content...

Implementors

impl<G: Scope, D: Data> Inspect<G, D> for Stream<G, D>[src]

Loading content...