pub trait StepAccumulator: Sized {
// Required method
fn steps_mut(&mut self) -> &mut Vec<BuilderStep>;
// Provided methods
fn to(self, endpoint: impl Into<String>) -> Self { ... }
fn process<F, Fut>(self, f: F) -> Self
where F: Fn(Exchange) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Exchange, CamelError>> + Send + 'static { ... }
fn process_fn(self, processor: BoxProcessor) -> Self { ... }
fn set_header(self, key: impl Into<String>, value: impl Into<Value>) -> Self { ... }
fn map_body<F>(self, mapper: F) -> Self
where F: Fn(Body) -> Body + Clone + Send + Sync + 'static { ... }
fn set_body<B>(self, body: B) -> Self
where B: Into<Body> + Clone + Send + Sync + 'static { ... }
fn set_body_fn<F>(self, expr: F) -> Self
where F: Fn(&Exchange) -> Body + Clone + Send + Sync + 'static { ... }
fn set_header_fn<F>(self, key: impl Into<String>, expr: F) -> Self
where F: Fn(&Exchange) -> Value + Clone + Send + Sync + 'static { ... }
fn aggregate(self, config: AggregatorConfig) -> Self { ... }
fn stop(self) -> Self { ... }
fn log(self, message: impl Into<String>, level: LogLevel) -> Self { ... }
}Expand description
Shared step-accumulation methods for all builder types.
Implementors provide steps_mut() and get step-adding methods for free.
filter() and other branching methods are NOT included — they return
different types per builder and stay as per-builder methods.
Required Methods§
fn steps_mut(&mut self) -> &mut Vec<BuilderStep>
Provided Methods§
fn to(self, endpoint: impl Into<String>) -> Self
fn process<F, Fut>(self, f: F) -> Self
fn process_fn(self, processor: BoxProcessor) -> Self
fn set_header(self, key: impl Into<String>, value: impl Into<Value>) -> Self
fn map_body<F>(self, mapper: F) -> Self
fn set_body<B>(self, body: B) -> Self
fn set_body_fn<F>(self, expr: F) -> Self
fn set_header_fn<F>(self, key: impl Into<String>, expr: F) -> Self
fn aggregate(self, config: AggregatorConfig) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.