pub struct StreamingSplitSegment {
pub expression: StreamingSplitExpression,
pub body: OutcomeSegment,
pub aggregation: AggregationStrategy,
pub stop_on_exception: bool,
}Expand description
Outcome-aware StreamingSplit segment. Consumes a stream of fragment
Exchanges via expression(exchange), runs body on each sequentially.
On Stop: return Stopped(fragment_ex) immediately; the stream local is
dropped when this future returns, closing the underlying stream resource.
Aggregation is SKIPPED when Stop fires (spec §5.3).
NOTE: No CancellationToken — the stream-drop path (route
shutdown) is handled by Drop semantics on the source stream future.
Adding an internal cancel token + tokio::select! adds dead complexity:
nothing external can fire the token (it’s private), and the same-future
cancel-after-Stop branch can never win (we’ve already returned).
Fields§
§expression: StreamingSplitExpressionProduces a stream of fragment exchanges from the incoming exchange.
body: OutcomeSegmentThe sub-pipeline executed for each fragment.
aggregation: AggregationStrategyStrategy for aggregating fragment results.
stop_on_exception: boolWhether to stop processing on the first exception.
When true, a Failed outcome from any fragment halts processing
immediately (matching legacy behavior). When false, the error is
collected and processing continues; the last error is propagated
after the stream is exhausted.
Stopped outcomes always propagate immediately regardless of this
flag (per ADR-0025 §7 — Stop is successful control flow).
Trait Implementations§
Source§impl Clone for StreamingSplitSegment
impl Clone for StreamingSplitSegment
Source§impl OutcomePipeline for StreamingSplitSegment
impl OutcomePipeline for StreamingSplitSegment
Source§fn clone_box(&self) -> Box<dyn OutcomePipeline>
fn clone_box(&self) -> Box<dyn OutcomePipeline>
Box<dyn OutcomePipeline> cannot directly derive Clone.