pub enum CompiledStep {
Process {
processor: BoxProcessor,
body_contract: Option<BodyType>,
lifecycle: Option<Arc<dyn StepLifecycle>>,
},
Stop,
Segment {
segment: OutcomeSegment,
body_contract: Option<BodyType>,
lifecycle: Option<Vec<Arc<dyn StepLifecycle>>>,
},
}Expand description
A compiled pipeline step.
Process is the normal case: a boxed processor plus its optional body
contract. Stop (added in Task 3b) is the Stop EIP marker — run_steps
recognises it and produces PipelineOutcome::Stopped without invoking a
Tower service. Segment (added in Task 3) wraps an OutcomeSegment for
structural EIPs with outcome-aware sub-pipelines.
Boundary: CompiledStep is the compile-time representation. At runtime,
run_steps consumes a Vec<CompiledStep> (Stop variants included) and
produces a PipelineOutcome; the wrapping Service<Exchange> impl
translates PipelineOutcome back to Result<Exchange, CamelError>. See
ADR-0024.
Variants§
Process
Fields
processor: BoxProcessorlifecycle: Option<Arc<dyn StepLifecycle>>Lifecycle handle for this processor, if it is stateful.
None for stateless processors (the common case).
Stop
Stop EIP marker. run_steps produces PipelineOutcome::Stopped(ex)
without invoking a Tower service. Replaces StopService (Task 7).
Segment
Outcome-aware structural EIP segment. run_steps invokes
segment.run(ex) and matches on the returned PipelineOutcome.
See ADR-0025.
Fields
segment: OutcomeSegmentlifecycle: Option<Vec<Arc<dyn StepLifecycle>>>Lifecycle handles from children nested inside this segment.
Option<Vec<...>> (not Option<Arc<...>>) so multiple stateful
children (e.g. Idempotent+Resequencer inside Filter) each
register independently.
Trait Implementations§
Source§impl Clone for CompiledStep
impl Clone for CompiledStep
Source§fn clone(&self) -> CompiledStep
fn clone(&self) -> CompiledStep
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more