Module timely::dataflow::operators::core::enterleave

source ·
Expand description

Extension traits to move a Stream between an outer Scope and inner Scope.

Each Stream indicates its containing Scope as part of its type signature. To create a new stream with the same contents in another scope, one must explicit use the methods enter and leave, to clearly indicate the transition to the timely dataflow progress tracking logic.


use timely::dataflow::scopes::Scope;
use timely::dataflow::operators::{Enter, Leave, ToStream, Inspect};

timely::example(|outer| {
    let stream = (0..9).to_stream(outer);
    let output = outer.region(|inner| {
              .inspect(|x| println!("in nested scope: {:?}", x))


  • Extension trait to move a Stream into a child of its current Scope.
  • Extension trait to move a Stream to the parent of its current Scope.