Skip to main content

Collector

Trait Collector 

Source
pub trait Collector<T> {
    // Required method
    fn push(&mut self, rec: Record<T>) -> Flow;
}
Expand description

Push-model stage: receives one record, forwards 0..N downstream.

Composed statically — Map<F, Filter<P, Term>> monomorphizes into a single inlined loop body.

Required Methods§

Source

fn push(&mut self, rec: Record<T>) -> Flow

Push one record. Flow::Blocked propagates up to the boundary.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'buf, F, E, R> Collector<<F as RecFamily>::Rec<'buf>> for SinkHandoff<F, E, R>
where F: RecFamily, E: RowEncoder<F> + Clone, R: RecordRouter<F>,

Source§

impl<'buf, SrcF, G> Collector<<SrcF as RecFamily>::Rec<'buf>> for SplitTerminal<SrcF, G>
where SrcF: RecFamily, G: for<'b> FnMut(SrcF::Rec<'b>, &mut SplitEmitter<'_>),

Source§

impl<In, Out, E, G, N> Collector<In> for TryMap<G, N>
where G: FnMut(In) -> Result<Out, E>, E: Display, N: Collector<Out>,

Source§

impl<In, Out, G, N> Collector<In> for Map<G, N>
where G: FnMut(In) -> Out, N: Collector<Out>,

Source§

impl<In, OutF, G, N> Collector<In> for FlatMap<OutF, G, N>
where OutF: RecFamily, G: FnMut(In, &mut Emitter<'_, OutF>), N: for<'buf> Collector<<OutF as RecFamily>::Rec<'buf>>,

Source§

impl<T, G, N> Collector<T> for Inspect<G, N>
where G: FnMut(&T), N: Collector<T>,

Source§

impl<T, P, N> Collector<T> for Filter<P, N>
where P: FnMut(&T) -> bool, N: Collector<T>,