pub struct SplitBuilder<DF: RecFamily, CurF: RecFamily, D, P> { /* private fields */ }Expand description
Accumulates split-sink branches before the routing closure is supplied.
Built by ChainBuilder::split; each add declares one
destination and hands back a typed handle, then route
takes the closure that dispatches to them.
Implementations§
Source§impl<DF: RecFamily, CurF: RecFamily, D, P> SplitBuilder<DF, CurF, D, P>
impl<DF: RecFamily, CurF: RecFamily, D, P> SplitBuilder<DF, CurF, D, P>
Sourcepub fn add<F, E, R>(&mut self, encoder: E, router: R, sink: SinkCtx) -> Sink<F>where
F: RecFamily + 'static,
E: RowEncoder<F> + Clone + Send + 'static,
R: RecordRouter<F> + 'static,
pub fn add<F, E, R>(&mut self, encoder: E, router: R, sink: SinkCtx) -> Sink<F>where
F: RecFamily + 'static,
E: RowEncoder<F> + Clone + Send + 'static,
R: RecordRouter<F> + 'static,
Declare one destination branch of family F and return its typed,
Copy Sink<F> handle. sink comes from
ChainCtx::sink; encoder/router
are that table’s, exactly as for ChainBuilder::sink. The declaration
order fixes the handle indices; call once per destination, then
route.
Sourcepub fn route<G>(self, route: G) -> RoutedSplit<DF, CurF, D, P, G>
pub fn route<G>(self, route: G) -> RoutedSplit<DF, CurF, D, P, G>
Supply the routing closure (classify + extract per record in one
match) and finish the split. The closure emits each record to exactly
one branch via SplitEmitter::emit; emitting to none invokes the
unmatched policy from ChainBuilder::split.
Trait Implementations§
Auto Trait Implementations§
impl<DF, CurF, D, P> !RefUnwindSafe for SplitBuilder<DF, CurF, D, P>
impl<DF, CurF, D, P> !Sync for SplitBuilder<DF, CurF, D, P>
impl<DF, CurF, D, P> !UnwindSafe for SplitBuilder<DF, CurF, D, P>
impl<DF, CurF, D, P> Freeze for SplitBuilder<DF, CurF, D, P>
impl<DF, CurF, D, P> Send for SplitBuilder<DF, CurF, D, P>
impl<DF, CurF, D, P> Unpin for SplitBuilder<DF, CurF, D, P>
impl<DF, CurF, D, P> UnsafeUnpin for SplitBuilder<DF, CurF, D, P>where
D: UnsafeUnpin,
P: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more