pub trait RunnableChain: Send {
// Required methods
fn push_batch<'buf>(
&mut self,
batch: &mut dyn PayloadBatch<'buf>,
from: usize,
) -> PushOutcome;
fn flush(&mut self) -> PushOutcome;
// Provided method
fn abandon_batch(&mut self) { ... }
}Expand description
THE SEAM — the one erasure boundary between a pipeline thread’s driver
loop and a typed chain. The methods are generic over the buffer lifetime
only, so Box<dyn RunnableChain> is legal.
Required Methods§
Sourcefn push_batch<'buf>(
&mut self,
batch: &mut dyn PayloadBatch<'buf>,
from: usize,
) -> PushOutcome
fn push_batch<'buf>( &mut self, batch: &mut dyn PayloadBatch<'buf>, from: usize, ) -> PushOutcome
Push payloads from.. of batch through the chain.
Sourcefn flush(&mut self) -> PushOutcome
fn flush(&mut self) -> PushOutcome
Flush terminal-stage state (parked records, partial encoder buffers) downstream. Called by the driver on drain, on linger deadlines, and before commit ticks.
Provided Methods§
Sourcefn abandon_batch(&mut self)
fn abandon_batch(&mut self)
Discard any per-batch replay/resume state after the driver failed the
current batch’s acknowledgement (a shutdown-time abandonment of a
batch blocked mid-push). Terminal parked chunks — which carry their
own acks — are unaffected; only the chain’s own mid-batch cursor and
any stashed not-ready payload are cleared, so the next push_batch of
a fresh batch starts clean instead of tripping the resume-cursor
asserts or replaying the stale payload under the new batch’s ack.
The default is a no-op for chains that keep no cross-call batch state.