pub enum CompiledStep {
Process {
processor: BoxProcessor,
body_contract: Option<BodyType>,
lifecycle: Option<Arc<dyn StepLifecycle>>,
label: Option<Arc<str>>,
kind_hint: SpanKindHint,
},
Stop,
Segment {
segment: OutcomeSegment,
body_contract: Option<BodyType>,
lifecycle: Option<Vec<Arc<dyn StepLifecycle>>>,
label: Option<Arc<str>>,
},
}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).
label: Option<Arc<str>>Stable span name (e.g. to:direct, split), stamped by
StepCompilerRegistry::compile_step from
BuilderStep::span_label. None for anonymous steps — spans
fall back to the positional step-{index} name. Read by
compose_traced_pipeline / segment_span in route_compiler.rs.
kind_hint: SpanKindHintSpan kind for this step’s step span, stamped by
StepCompilerRegistry::compile_step from
BuilderStep::span_kind_hint. Internal for steps built
outside the registry. Read by compose_traced_pipeline in
route_compiler.rs.
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<...>>) because multiple stateful
children (e.g. Idempotent+Resequencer inside Filter) each
register independently.
label: Option<Arc<str>>Stable span name, same contract as CompiledStep::Process’s
label field.
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