[−][src]Struct timely::dataflow::operators::generic::InputHandle
Handle to an operator's input stream.
Methods
impl<'a, T: Timestamp, D: Data, P: Pull<Bundle<T, D>>> InputHandle<T, D, P>
[src]
pub fn next(&mut self) -> Option<(CapabilityRef<T>, RefOrMut<Vec<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.
pub fn for_each<F: FnMut(CapabilityRef<T>, RefOrMut<Vec<D>>)>(
&mut self,
logic: F
)
[src]
&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; use timely::dataflow::operators::generic::Operator; use timely::dataflow::channels::pact::Pipeline; timely::example(|scope| { (0..10).to_stream(scope) .unary(Pipeline, "example", |_cap, _info| |input, output| { input.for_each(|cap, data| { output.session(&cap).give_vec(&mut data.replace(Vec::new())); }); }); });
Auto Trait Implementations
impl<T, D, P> !Send for InputHandle<T, D, P>
impl<T, D, P> !Sync for InputHandle<T, D, P>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,