pub trait ToStream<D: Data> {
// Required method
fn to_stream<S: Scope>(self, scope: &mut S) -> Stream<S, D>;
}
Expand description
Converts to a timely Stream
.
Required Methods§
sourcefn to_stream<S: Scope>(self, scope: &mut S) -> Stream<S, D>
fn to_stream<S: Scope>(self, scope: &mut S) -> Stream<S, D>
Converts to a timely Stream
.
§Examples
use timely::dataflow::operators::{ToStream, Capture};
use timely::dataflow::operators::capture::Extract;
let (data1, data2) = timely::example(|scope| {
let data1 = (0..3).to_stream(scope).capture();
let data2 = vec![0,1,2].to_stream(scope).capture();
(data1, data2)
});
assert_eq!(data1.extract(), data2.extract());
Object Safety§
This trait is not object safe.