Skip to main content

ConcatenateFlatten

Trait ConcatenateFlatten 

Source
pub trait ConcatenateFlatten<'scope, T: Timestamp, C: Container + DrainContainer> {
    // Required method
    fn concatenate_flatten<I, CB>(
        &self,
        sources: I,
    ) -> Stream<'scope, T, CB::Container>
       where I: IntoIterator<Item = Stream<'scope, T, 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, ) -> Stream<'scope, T, CB::Container>
where I: IntoIterator<Item = Stream<'scope, T, 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<timely::dataflow::StreamVec<_, i32>> =
        vec![(0..10).to_stream(scope),
             (0..10).to_stream(scope),
             (0..10).to_stream(scope)];

    scope.concatenate_flatten::<_, CapacityContainerBuilder<Vec<i32>>>(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".

Implementations on Foreign Types§

Source§

impl<'scope, T, C> ConcatenateFlatten<'scope, T, C> for Scope<'scope, T>

Source§

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

Source§

impl<'scope, T, C> ConcatenateFlatten<'scope, T, C> for Stream<'scope, T, C>
where T: Timestamp, C: Container + DrainContainer + Clone + 'static,

Source§

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

Implementors§