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§
sourcefn to_stream_with_builder<S: Scope>(
self,
scope: &mut S,
) -> StreamCore<S, CB::Container>
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.