Trait timely::dataflow::operators::core::to_stream::ToStream

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

Converts to a timely StreamCore. Equivalent to ToStreamBuilder but uses a CapacityContainerBuilder.

Required Methods§

source

fn to_stream<S: Scope>(self, scope: &mut S) -> StreamCore<S, C>

Converts to a timely StreamCore.

§Examples
use timely::dataflow::operators::core::{ToStream, Capture};
use timely::dataflow::operators::core::capture::Extract;

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

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C, I: IntoIterator + 'static> ToStream<C> for I