pub struct OutputHandleCore<'a, T: Timestamp, C: Container + 'a, P: Push<Bundle<T, C>> + 'a> { /* private fields */ }
Expand description
Handle to an operator’s output stream.
Implementations§
source§impl<'a, T: Timestamp, C: Container, P: Push<Bundle<T, C>>> OutputHandleCore<'a, T, C, P>
impl<'a, T: Timestamp, C: Container, P: Push<Bundle<T, C>>> OutputHandleCore<'a, T, C, P>
sourcepub fn session<'b, CT: CapabilityTrait<T>>(
&'b mut self,
cap: &'b CT
) -> Session<'b, T, C, PushCounter<T, C, P>>where
'a: 'b,
pub fn session<'b, CT: CapabilityTrait<T>>(
&'b mut self,
cap: &'b CT
) -> Session<'b, T, C, PushCounter<T, C, P>>where
'a: 'b,
Obtains a session that can send data at the timestamp associated with capability cap
.
In order to send data at a future timestamp, obtain a capability for the new timestamp first, as show in the example.
§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| {
let time = cap.time().clone() + 1;
output.session(&cap.delayed(&time))
.give_vec(&mut data.replace(Vec::new()));
});
});
});
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, C, P> Freeze for OutputHandleCore<'a, T, C, P>
impl<'a, T, C, P> !RefUnwindSafe for OutputHandleCore<'a, T, C, P>
impl<'a, T, C, P> !Send for OutputHandleCore<'a, T, C, P>
impl<'a, T, C, P> !Sync for OutputHandleCore<'a, T, C, P>
impl<'a, T, C, P> Unpin for OutputHandleCore<'a, T, C, P>
impl<'a, T, C, P> !UnwindSafe for OutputHandleCore<'a, 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<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
impl<R, O, T> CopyOnto<ConsecutiveOffsetPairs<R, O>> for T
source§fn copy_onto(
self,
target: &mut ConsecutiveOffsetPairs<R, O>
) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
fn copy_onto( self, target: &mut ConsecutiveOffsetPairs<R, O> ) -> <ConsecutiveOffsetPairs<R, O> as Region>::Index
Copy self into the target container, returning an index that allows to
look up the corresponding read item.