Struct timely::dataflow::operators::InputHandle
[−]
[src]
pub struct InputHandle<'a, T: Timestamp, D: 'a> { // some fields omitted }
Handle to an operator's input stream.
Methods
impl<'a, T: Timestamp, D> InputHandle<'a, T, D>
[src]
fn next(&mut self) -> Option<(Capability<T>, &mut Content<D>)>
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)
Repeatedly calls logic
till exhaustion of the available input data.
logic
receives a capability and an input buffer.
Examples
use timely::dataflow::operators::{ToStream, 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); }); }); });