pub struct SubFlowOptions { /* private fields */ }Expand description
Configures one durable SubFlow Condition.
Changed in 1.25.0: the SubFlow always selects pull Workers. Other omitted
configuration fields inherit the parent’s effective settings. Dex generates its Flow ID and
request ID. Builder methods preserve normal Flow start defaults when omitted.
Matching generated request IDs always attach to an existing child, regardless of reuse policy.
For different request IDs, the reuse policy decides whether to attach or restart.
Completing an any-of wait does not stop non-winning SubFlows; use their generated Flow IDs
with crate::Client::stop_flow when those children should stop.
Implementations§
Source§impl SubFlowOptions
impl SubFlowOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates options using the abnormal-restart reuse policy and normal start defaults.
Sourcepub fn timeout(self, value: Duration) -> Self
pub fn timeout(self, value: Duration) -> Self
Sets the maximum total SubFlow execution duration.
Sourcepub fn timeout_policy(self, value: FlowTimeoutPolicy) -> Self
pub fn timeout_policy(self, value: FlowTimeoutPolicy) -> Self
Selects what Dex does when the positive soft SubFlow timeout expires.
Sourcepub fn timeout_handler_options(self, value: FlowTimeoutHandlerOptions) -> Self
pub fn timeout_handler_options(self, value: FlowTimeoutHandlerOptions) -> Self
Configures execution and selective state loading for the target Flow’s timeout handler.
Sourcepub fn start_delay(self, value: Duration) -> Self
pub fn start_delay(self, value: Duration) -> Self
Sets a delay before the SubFlow starting Step after server acceptance.
The Server currently supports only a zero delay. It rejects a Step result that requests a SubFlow with a positive delay as invalid input, so that Step attempt fails.
Sourcepub fn retry_policy(self, value: RetryPolicy) -> Self
pub fn retry_policy(self, value: RetryPolicy) -> Self
Sets a whole-Flow retry policy for the SubFlow.
The Server does not support whole-Flow retry. It rejects a Step result that requests a
SubFlow with this option as invalid input, so that Step attempt fails. Configure
crate::RetryPolicy on the SubFlow’s Step methods through crate::StepOptions
instead.
Sourcepub fn config_override(self, value: FlowConfig) -> Self
pub fn config_override(self, value: FlowConfig) -> Self
Applies fields over the inherited parent Flow configuration.
Sourcepub fn reuse_policy(self, value: SubFlowReusePolicy) -> Self
pub fn reuse_policy(self, value: SubFlowReusePolicy) -> Self
Selects existing-execution resolution behavior.
Sourcepub fn condition_id(self, value: impl Into<String>) -> Self
pub fn condition_id(self, value: impl Into<String>) -> Self
Assigns the stable ID required by crate::Wait::any_combination_of.
Sourcepub fn initial_attribute<T: Value>(
self,
attribute: &Attribute<T>,
value: T,
) -> Self
pub fn initial_attribute<T: Value>( self, attribute: &Attribute<T>, value: T, ) -> Self
Adds one initial singleton Attribute owned by the target SubFlow.
Sourcepub fn initial_attribute_map<T: Value>(
self,
attribute: &AttributeMap<T>,
instance: &str,
value: T,
) -> Self
pub fn initial_attribute_map<T: Value>( self, attribute: &AttributeMap<T>, instance: &str, value: T, ) -> Self
Adds one initial Attribute-map value for an instance. Slash is prohibited in instance keys because it is a reserved character.
Trait Implementations§
Source§impl Clone for SubFlowOptions
impl Clone for SubFlowOptions
Auto Trait Implementations§
impl !RefUnwindSafe for SubFlowOptions
impl !UnwindSafe for SubFlowOptions
impl Forget for SubFlowOptions
impl Freeze for SubFlowOptions
impl Send for SubFlowOptions
impl Sync for SubFlowOptions
impl Unpin for SubFlowOptions
impl UnsafeUnpin for SubFlowOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request