Trait ConcatenateFlatten

Source
pub trait ConcatenateFlatten<G: Scope, C: Container + DrainContainer> {
    // Required method
    fn concatenate_flatten<I, CB>(
        &self,
        sources: I,
    ) -> StreamCore<G, CB::Container>
       where I: IntoIterator<Item = StreamCore<G, C>>,
             CB: ContainerBuilder + for<'a> PushInto<C::Item<'a>>;
}
Expand description

Merge the contents of multiple streams and combine the containers using a container builder.

Required Methods§

Source

fn concatenate_flatten<I, CB>(&self, sources: I) -> StreamCore<G, CB::Container>
where I: IntoIterator<Item = StreamCore<G, C>>, CB: ContainerBuilder + for<'a> PushInto<C::Item<'a>>,

Merge the contents of multiple streams and use the provided container builder to form output containers.

§Examples
use timely::container::CapacityContainerBuilder;
use timely::dataflow::operators::{ToStream, Inspect};
use mz_timely_util::operator::ConcatenateFlatten;

timely::example(|scope| {

    let streams = vec![(0..10).to_stream(scope),
                       (0..10).to_stream(scope),
                       (0..10).to_stream(scope)];

    scope.concatenate_flatten::<_, CapacityContainerBuilder<Vec<_>>>(streams)
         .inspect(|x| println!("seen: {:?}", x));
});

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.

Implementations on Foreign Types§

Source§

impl<G, C> ConcatenateFlatten<G, C> for StreamCore<G, C>

Source§

fn concatenate_flatten<I, CB>(&self, sources: I) -> StreamCore<G, CB::Container>
where I: IntoIterator<Item = StreamCore<G, C>>, CB: ContainerBuilder + for<'a> PushInto<C::Item<'a>>,

Implementors§

Source§

impl<G, C> ConcatenateFlatten<G, C> for G