Function timely::dataflow::operators::generic::operator::empty

source ·
pub fn empty<G: Scope, C: Container>(scope: &G) -> StreamCore<G, C>
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"));

});