pub struct StepDecision { /* private fields */ }Expand description
Describes the durable outcome of one successful Step execution.
A decision moves to one or more Steps, completes or fails the Flow, waits for Channels to empty, or deliberately leaves the Flow at a dead end.
Implementations§
Source§impl StepDecision
impl StepDecision
Sourcepub fn go_to<TargetStep>(step: &TargetStep, input: TargetStep::Input) -> Selfwhere
TargetStep: Step,
pub fn go_to<TargetStep>(step: &TargetStep, input: TargetStep::Input) -> Selfwhere
TargetStep: Step,
Moves to one typed target Step.
Sourcepub fn go_to_many(movements: impl IntoIterator<Item = StepMovement>) -> Self
pub fn go_to_many(movements: impl IntoIterator<Item = StepMovement>) -> Self
Moves to all targets, enabling concurrent active Steps.
Sourcepub fn graceful_complete<Output: Value>(output: Output) -> Self
pub fn graceful_complete<Output: Value>(output: Output) -> Self
Completes only after all other active Steps finish, returning output.
Sourcepub fn force_complete<Output: Value>(output: Output) -> Self
pub fn force_complete<Output: Value>(output: Output) -> Self
Completes immediately, abandoning other active Steps and returning output.
Sourcepub fn force_complete_if_channels_empty<Output: Value>(
output: Output,
fallback: StepMovement,
channels: impl IntoIterator<Item = ChannelGuard>,
) -> Self
pub fn force_complete_if_channels_empty<Output: Value>( output: Output, fallback: StepMovement, channels: impl IntoIterator<Item = ChannelGuard>, ) -> Self
Completes with output when every guard is empty; otherwise follows fallback.
Sourcepub fn force_fail(reason: impl Into<String>) -> Self
pub fn force_fail(reason: impl Into<String>) -> Self
Fails the Flow immediately with an application-provided reason.
Auto Trait Implementations§
impl !RefUnwindSafe for StepDecision
impl !UnwindSafe for StepDecision
impl Freeze for StepDecision
impl Send for StepDecision
impl Sync for StepDecision
impl Unpin for StepDecision
impl UnsafeUnpin for StepDecision
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