pub trait Feedback<G: Scope> {
// Required method
fn feedback<C: Container>(
&mut self,
summary: <G::Timestamp as Timestamp>::Summary,
) -> (Handle<G, C>, Stream<G, C>);
}Expand description
Creates a Stream and a Handle to later bind the source of that Stream.
Required Methods§
Sourcefn feedback<C: Container>(
&mut self,
summary: <G::Timestamp as Timestamp>::Summary,
) -> (Handle<G, C>, Stream<G, C>)
fn feedback<C: Container>( &mut self, summary: <G::Timestamp as Timestamp>::Summary, ) -> (Handle<G, C>, Stream<G, C>)
Creates a Stream and a Handle to later bind the source of that Stream.
The resulting Stream will have its data defined by a future call to connect_loop with
its Handle passed as an argument. Containers passed through the stream will have their
timestamps advanced by summary.
§Examples
use timely::dataflow::Scope;
use timely::dataflow::operators::{Feedback, ConnectLoop, ToStream, Concat, Inspect};
use timely::dataflow::operators::vec::BranchWhen;
timely::example(|scope| {
// circulate 0..10 for 100 iterations.
let (handle, cycle) = scope.feedback(1);
(0..10).to_stream(scope)
.container::<Vec<_>>()
.concat(cycle)
.inspect(|x| println!("seen: {:?}", x))
.branch_when(|t| t < &100).1
.connect_loop(handle);
});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.