empty

Function empty 

Source
pub fn empty<G: Scope, D: Container>(scope: &G) -> StreamCore<G, D>
Expand description

Constructs an empty stream.

This method is useful in patterns where an input is required, but there is no meaningful data to provide. The replaces patterns like stream.filter(|_| false) which are just silly.

ยงExamples

use timely::dataflow::operators::Inspect;
use timely::dataflow::operators::generic::operator::empty;
use timely::dataflow::Scope;

timely::example(|scope| {


    empty::<_, Vec<_>>(scope)     // type required in this example
        .inspect(|()| panic!("never called"));

});