pub struct OutputHandleCore<'a, T: Timestamp, CB: ContainerBuilder + 'a, P: Push<Message<T, CB::Container>> + 'a> { /* private fields */ }
Expand description
Handle to an operator’s output stream.
Implementations§
source§impl<'a, T: Timestamp, CB: ContainerBuilder, P: Push<Message<T, CB::Container>>> OutputHandleCore<'a, T, CB, P>
impl<'a, T: Timestamp, CB: ContainerBuilder, P: Push<Message<T, CB::Container>>> OutputHandleCore<'a, T, CB, P>
sourcepub fn session_with_builder<'b, CT: CapabilityTrait<T>>(
&'b mut self,
cap: &'b CT,
) -> Session<'b, T, CB, PushCounter<T, CB::Container, P>>where
'a: 'b,
pub fn session_with_builder<'b, CT: CapabilityTrait<T>>(
&'b mut self,
cap: &'b CT,
) -> Session<'b, T, CB, PushCounter<T, CB::Container, 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;
use timely::container::CapacityContainerBuilder;
timely::example(|scope| {
(0..10).to_stream(scope)
.unary::<CapacityContainerBuilder<_>, _, _, _>(Pipeline, "example", |_cap, _info| |input, output| {
input.for_each(|cap, data| {
let time = cap.time().clone() + 1;
output.session_with_builder(&cap.delayed(&time))
.give_container(data);
});
});
});
source§impl<'a, T: Timestamp, C: Container + Data, P: Push<Message<T, C>>> OutputHandleCore<'a, T, CapacityContainerBuilder<C>, P>
impl<'a, T: Timestamp, C: Container + Data, P: Push<Message<T, C>>> OutputHandleCore<'a, T, CapacityContainerBuilder<C>, P>
sourcepub fn session<'b, CT: CapabilityTrait<T>>(
&'b mut self,
cap: &'b CT,
) -> Session<'b, T, CapacityContainerBuilder<C>, PushCounter<T, C, P>>where
'a: 'b,
pub fn session<'b, CT: CapabilityTrait<T>>(
&'b mut self,
cap: &'b CT,
) -> Session<'b, T, CapacityContainerBuilder<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_container(data);
});
});
});
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, CB, P> Freeze for OutputHandleCore<'a, T, CB, P>
impl<'a, T, CB, P> !RefUnwindSafe for OutputHandleCore<'a, T, CB, P>
impl<'a, T, CB, P> !Send for OutputHandleCore<'a, T, CB, P>
impl<'a, T, CB, P> !Sync for OutputHandleCore<'a, T, CB, P>
impl<'a, T, CB, P> Unpin for OutputHandleCore<'a, T, CB, P>
impl<'a, T, CB, P> !UnwindSafe for OutputHandleCore<'a, T, CB, 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