Trait 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());

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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