pub struct WhileloopFlow {
pub modules: Vec<FlowModule>,
pub skip_failures: bool,
pub type: Type,
pub parallel: Option<bool>,
pub parallelism: Option<Box<InputTransform>>,
pub squash: Option<bool>,
}Expand description
WhileloopFlow : Executes nested modules repeatedly until stopped. The implicit iterator is the iteration counter, so ‘flow_input.iter.value’ equals ‘flow_input.iter.index’ (0, 1, 2, …) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via ‘results.<its_own_id>’ with a first-iteration fallback - the loop’s stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve ‘results’ across iterations and never terminates); plain counters can instead be derived from ‘flow_input.iter.index’, which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module ‘result’ is the last iteration’s result
Fields§
§modules: Vec<FlowModule>Steps to execute in each iteration
skip_failures: boolIf true, iteration failures don’t stop the loop. Failed iterations return null
type: Type§parallel: Option<bool>If true, iterations run concurrently (use with caution in while loops)
parallelism: Option<Box<InputTransform>>§squash: Option<bool>Implementations§
Source§impl WhileloopFlow
impl WhileloopFlow
Sourcepub fn new(
modules: Vec<FlowModule>,
skip_failures: bool,
type: Type,
) -> WhileloopFlow
pub fn new( modules: Vec<FlowModule>, skip_failures: bool, type: Type, ) -> WhileloopFlow
Executes nested modules repeatedly until stopped. The implicit iterator is the iteration counter, so ‘flow_input.iter.value’ equals ‘flow_input.iter.index’ (0, 1, 2, …) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via ‘results.<its_own_id>’ with a first-iteration fallback - the loop’s stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve ‘results’ across iterations and never terminates); plain counters can instead be derived from ‘flow_input.iter.index’, which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module ‘result’ is the last iteration’s result
Trait Implementations§
Source§impl Clone for WhileloopFlow
impl Clone for WhileloopFlow
Source§fn clone(&self) -> WhileloopFlow
fn clone(&self) -> WhileloopFlow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more