pub struct SubFlow;Expand description
Creates durable SubFlow Conditions and reads their Execute results.
Implementations§
Source§impl SubFlow
impl SubFlow
Sourcepub fn run<SomeFlow: Flow>(
flow: &SomeFlow,
input: SomeFlow::StartInput,
) -> SdkResult<Condition>
pub fn run<SomeFlow: Flow>( flow: &SomeFlow, input: SomeFlow::StartInput, ) -> SdkResult<Condition>
Creates a SubFlow Condition with default options.
§Errors
Returns a value-mapping error when input cannot be encoded.
Sourcepub fn run_with_options<SomeFlow: Flow>(
flow: &SomeFlow,
input: SomeFlow::StartInput,
options: SubFlowOptions,
) -> SdkResult<Condition>
pub fn run_with_options<SomeFlow: Flow>( flow: &SomeFlow, input: SomeFlow::StartInput, options: SubFlowOptions, ) -> SdkResult<Condition>
Creates a SubFlow Condition with explicit options.
§Errors
Returns a value-mapping error when input cannot be encoded. Worker mapping later validates
the exact registered Rust Flow type, starting Step, Attributes, and option durations.
Sourcepub fn condition_result(context: &Context) -> HandlerResult<FlowResult>
pub fn condition_result(context: &Context) -> HandlerResult<FlowResult>
Returns the first SubFlow result during Step execute.
Sourcepub fn condition_result_at(
context: &Context,
index: usize,
) -> HandlerResult<FlowResult>
pub fn condition_result_at( context: &Context, index: usize, ) -> HandlerResult<FlowResult>
Returns one stable-indexed SubFlow result during Step execute.
Sourcepub fn flow_id(context: &Context) -> HandlerResult<String>
pub fn flow_id(context: &Context) -> HandlerResult<String>
Returns the generated Flow ID for the first SubFlow Condition during Step execute.
Sourcepub fn flow_id_at(context: &Context, index: usize) -> HandlerResult<String>
pub fn flow_id_at(context: &Context, index: usize) -> HandlerResult<String>
Returns the generated Flow ID for one stable-indexed SubFlow Condition during execute.
Auto Trait Implementations§
impl Freeze for SubFlow
impl RefUnwindSafe for SubFlow
impl Send for SubFlow
impl Sync for SubFlow
impl Unpin for SubFlow
impl UnsafeUnpin for SubFlow
impl UnwindSafe for SubFlow
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
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>
Wrap the input message
T in a tonic::Request