Skip to main content

CollectorFor

Trait CollectorFor 

Source
pub trait CollectorFor<F>
where F: RecFamily,
{ // Required method fn push_rec<'buf>( &mut self, rec: Record<<F as RecFamily>::Rec<'buf>>, ) -> Flow; }
Expand description

Family-erased collector: accepts the family’s record type at any buffer lifetime through a lifetime-generic method, which keeps it dyn-compatible. This is what lets flat_map closures hold a plain &mut Emitter<'_, OutF> without naming the downstream stack type.

Required Methods§

Source

fn push_rec<'buf>(&mut self, rec: Record<<F as RecFamily>::Rec<'buf>>) -> Flow

Push one record of the family at any lifetime.

Implementors§

Source§

impl<F, C> CollectorFor<F> for C
where F: RecFamily, C: for<'buf> Collector<<F as RecFamily>::Rec<'buf>>,