Skip to main content

RuntimeCommand

Enum RuntimeCommand 

Source
#[non_exhaustive]
pub enum RuntimeCommand {
Show 14 variants Complete { output: JsonValue, }, Fail { error: String, }, Cancel, Timeout { deadline: DateTime<Utc>, reason: Option<String>, }, ContinueAsNew { input: JsonValue, }, RecordProgress { progress: WorkflowProgress, }, LinkChildOperation { child: ChildOperationReference, }, StartChildWorkflow { child_id: String, spec: WorkflowSpec, input: JsonValue, cancellation_policy: ChildWorkflowCancellationPolicy, }, ScheduleStep { step_id: String, step_name: String, input: JsonValue, retry: RetryPolicy, }, ScheduleSteps { steps: Vec<StepCommand>, }, WaitUntil { wait_id: String, resume_at: DateTime<Utc>, }, CreateHook { hook_id: String, token: String, metadata: JsonValue, }, WaitForSignal { wait_id: String, signal_name: String, }, StartChildWorkflows { children: Vec<ChildWorkflowCommand>, },
}
Expand description

Command emitted by the workflow runtime after replay.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Complete

Completes the workflow run successfully.

Fields

§output: JsonValue

Final JSON value returned by the workflow.

§

Fail

Fails the workflow run with an application error.

Fields

§error: String

Human-readable failure description.

§

Cancel

Finish a previously requested cleanup-aware cancellation.

§

Timeout

Finish a run with a typed timeout outcome.

Fields

§deadline: DateTime<Utc>

UTC deadline that caused the timeout.

§reason: Option<String>

Optional context for the timeout decision.

§

ContinueAsNew

Close this history segment and start a successor with the same spec.

Fields

§input: JsonValue

Initial JSON input for the successor run.

§

RecordProgress

Persist progress before replaying the workflow.

Fields

§progress: WorkflowProgress

Progress value exposed through inspection and observation APIs.

§

LinkChildOperation

Persist a parent-to-child operation reference before replaying.

Fields

§child: ChildOperationReference

Stable reference to the externally managed child operation.

§

StartChildWorkflow

Start or await a first-class child workflow with a stable parent-local id.

Fields

§child_id: String

Replay-stable parent-local child identifier.

§spec: WorkflowSpec

Workflow definition used to create the child.

§input: JsonValue

Initial JSON input supplied to the child.

§cancellation_policy: ChildWorkflowCancellationPolicy

Policy applied when the parent is cancelled or terminated.

§

ScheduleStep

Schedules one durable step or awaits its recorded outcome.

Fields

§step_id: String

Replay-stable identity of the step.

§step_name: String

Registered step implementation name.

§input: JsonValue

JSON input supplied to the step.

§retry: RetryPolicy

Retry behavior pinned when the step is created.

§

ScheduleSteps

Atomically schedules a batch of durable steps.

Fields

§steps: Vec<StepCommand>

Step definitions in deterministic scheduling order.

§

WaitUntil

Suspends replay until a UTC deadline becomes ready.

Fields

§wait_id: String

Replay-stable identity of the timer wait.

§resume_at: DateTime<Utc>

UTC time at which the wait becomes ready.

§

CreateHook

Creates an externally completable hook.

Fields

§hook_id: String

Replay-stable identity of the hook.

§token: String

Secret bearer token required to deliver the hook.

§metadata: JsonValue

Application metadata persisted with the hook.

§

WaitForSignal

Suspend until the next unconsumed signal with signal_name is paired with this stable wait identity.

Fields

§wait_id: String

Replay-stable identity of the signal wait.

§signal_name: String

Declared signal contract accepted by the wait.

§

StartChildWorkflows

Request a bounded batch before any first-class child starts.

Fields

§children: Vec<ChildWorkflowCommand>

Child definitions in deterministic request order.

Implementations§

Source§

impl RuntimeCommand

Source

pub fn schedule_step( step_id: impl Into<String>, step_name: impl Into<String>, input: JsonValue, ) -> Self

Creates a single-step schedule command with the default retry policy.

Source

pub fn schedule_steps(steps: Vec<StepCommand>) -> Self

Creates an atomic batch scheduling command.

Source

pub fn start_child_workflows(children: Vec<ChildWorkflowCommand>) -> Self

Create a bounded batch child-workflow command.

Trait Implementations§

Source§

impl Clone for RuntimeCommand

Source§

fn clone(&self) -> RuntimeCommand

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RuntimeCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RuntimeCommand

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for RuntimeCommand

Source§

fn eq(&self, other: &RuntimeCommand) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RuntimeCommand

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RuntimeCommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SqlComparable<Option<T>> for T

Source§

impl<T> SqlComparable<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more