pub struct InputHandleCore<T: Timestamp, C, P: Pull<Message<T, C>>> { /* private fields */ }Expand description
Handle to an operator’s input stream.
Implementations§
Source§impl<T: Timestamp, C: Accountable, P: Pull<Message<T, C>>> InputHandleCore<T, C, P>
impl<T: Timestamp, C: Accountable, P: Pull<Message<T, C>>> InputHandleCore<T, C, P>
Sourcepub fn next(&mut self) -> Option<(InputCapability<T>, &mut C)>
pub fn next(&mut self) -> Option<(InputCapability<T>, &mut C)>
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.
Sourcepub fn for_each<F: FnMut(InputCapability<T>, &mut C)>(&mut self, logic: F)
pub fn for_each<F: FnMut(InputCapability<T>, &mut C)>(&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_container(data);
});
});
});Auto Trait Implementations§
impl<T, C, P> Freeze for InputHandleCore<T, C, P>where
P: Freeze,
impl<T, C, P> !RefUnwindSafe for InputHandleCore<T, C, P>
impl<T, C, P> !Send for InputHandleCore<T, C, P>
impl<T, C, P> !Sync for InputHandleCore<T, C, P>
impl<T, C, P> Unpin for InputHandleCore<T, C, P>
impl<T, C, P> !UnwindSafe for InputHandleCore<T, C, P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more