Struct timely::dataflow::operators::generic::InputHandle
[−]
[src]
pub struct InputHandle<T: Timestamp, D, P: Pull<(T, Content<D>)>> { /* fields omitted */ }
Handle to an operator's input stream.
Methods
impl<'a, T: Timestamp, D, P: Pull<(T, Content<D>)>> InputHandle<T, D, P>
[src]
fn next(&mut self) -> Option<(Capability<T>, &mut Content<D>)>
[src]
Reads the next input buffer (at some timestamp t
) and a corresponding capability for t
.
The timestamp t
of the input buffer can be retrieved by invoking .time()
on the capability.
Returns None
when there's no more data available.
fn for_each<F: FnMut(Capability<T>, &mut Content<D>)>(&mut self, logic: F)
[src]
Repeatedly calls logic
till exhaustion of the available input data.
logic
receives a capability and an input buffer.
Examples
use timely::dataflow::operators::ToStream; use timely::dataflow::operators::generic::unary::Unary; use timely::dataflow::channels::pact::Pipeline; timely::example(|scope| { (0..10).to_stream(scope) .unary_stream(Pipeline, "example", |input, output| { input.for_each(|cap, data| { output.session(&cap).give_content(data); }); }); });