pub struct WhenBuilder { /* private fields */ }Expand description
Builder for the sub-pipeline within a .when() … .end_when() block.
Implementations§
Source§impl WhenBuilder
impl WhenBuilder
Sourcepub fn end_when(self) -> ChoiceBuilder
pub fn end_when(self) -> ChoiceBuilder
Close the when scope. Packages the accumulated sub-steps into a
WhenStep and returns the parent ChoiceBuilder.
Trait Implementations§
Source§impl StepAccumulator for WhenBuilder
impl StepAccumulator for WhenBuilder
fn steps_mut(&mut self) -> &mut Vec<BuilderStep>
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
Source§fn stop(self) -> Self
fn stop(self) -> Self
Stop processing this exchange immediately. No further steps in the
current pipeline will run. Read more
fn delay(self, duration: Duration) -> Self
fn delay_with_header( self, duration: Duration, header: impl Into<String>, ) -> Self
Source§fn log(self, message: impl Into<String>, level: LogLevel) -> Self
fn log(self, message: impl Into<String>, level: LogLevel) -> Self
Log a message at the specified level. Read more
Source§fn convert_body_to(self, target: BodyType) -> Self
fn convert_body_to(self, target: BodyType) -> Self
Convert the message body to the target type. Read more
fn stream_cache(self, threshold: usize) -> Self
Source§fn stream_cache_default(self) -> Self
fn stream_cache_default(self) -> Self
Source§fn marshal(self, format: impl Into<String>) -> Result<Self, CamelError>
fn marshal(self, format: impl Into<String>) -> Result<Self, CamelError>
Marshal the message body using the specified data format. Read more
Source§fn unmarshal(self, format: impl Into<String>) -> Result<Self, CamelError>
fn unmarshal(self, format: impl Into<String>) -> Result<Self, CamelError>
Unmarshal the message body using the specified data format. Read more
Source§fn validate(self, schema_path: impl Into<String>) -> Self
fn validate(self, schema_path: impl Into<String>) -> Self
Validate the exchange body against a schema file. Read more
Source§fn script(self, language: impl Into<String>, script: impl Into<String>) -> Self
fn script(self, language: impl Into<String>, script: impl Into<String>) -> Self
Execute a script that can modify the exchange (headers, properties, body). Read more
Source§fn enrich(self, uri: impl Into<String>) -> Self
fn enrich(self, uri: impl Into<String>) -> Self
EIP-7 enrich: synchronous content enrichment via a resolved producer. Read more
Source§fn poll_enrich(self, uri: impl Into<String>, timeout_ms: u64) -> Self
fn poll_enrich(self, uri: impl Into<String>, timeout_ms: u64) -> Self
EIP-7 pollEnrich: blocking poll of a PollingConsumer with timeout. Read more
fn bean(self, name: impl Into<String>, method: impl Into<String>) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for WhenBuilder
impl !Sync for WhenBuilder
impl !UnwindSafe for WhenBuilder
impl Freeze for WhenBuilder
impl Send for WhenBuilder
impl Unpin for WhenBuilder
impl UnsafeUnpin for WhenBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more