Trait timely::dataflow::operators::core::to_stream::ToStreamBuilder

source ·
pub trait ToStreamBuilder<CB: ContainerBuilder> {
    // Required method
    fn to_stream_with_builder<S: Scope>(
        self,
        scope: &mut S
    ) -> StreamCore<S, CB::Container>;
}
Expand description

Converts to a timely StreamCore, using a container builder.

Required Methods§

source

fn to_stream_with_builder<S: Scope>( self, scope: &mut S ) -> StreamCore<S, CB::Container>

Converts to a timely StreamCore, using the supplied container builder type.

§Examples
use timely::dataflow::operators::core::{ToStreamBuilder, Capture};
use timely::dataflow::operators::core::capture::Extract;
use timely::container::CapacityContainerBuilder;

let (data1, data2) = timely::example(|scope| {
    let data1 = ToStreamBuilder::<CapacityContainerBuilder<_>>::to_stream_with_builder(0..3, scope)
        .container::<Vec<_>>()
        .capture();
    let data2 = ToStreamBuilder::<CapacityContainerBuilder<_>>::to_stream_with_builder(vec![0,1,2], scope)
        .container::<Vec<_>>()
        .capture();
    (data1, data2)
});

assert_eq!(data1.extract(), data2.extract());

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<CB, I: IntoIterator + 'static> ToStreamBuilder<CB> for I
where CB: PushInto<I::Item> + ContainerBuilder,