Skip to main content

FlowEvent

Enum FlowEvent 

Source
#[non_exhaustive]
pub enum FlowEvent {
Show 27 variants RunCreated { spec: WorkflowSpec, input: JsonValue, }, RunStarted, RunCompleted { output: JsonValue, }, RunFailed { error: String, }, RunCancellationRequested { request: CancellationRequest, }, RunCancelled { reason: Option<String>, }, RunTimedOut { deadline: DateTime<Utc>, reason: Option<String>, }, RunRetryExhausted { step_id: String, attempt: u32, error: String, }, RunHostShutdown { reason: Option<String>, }, RunContinuedAsNew { successor_run_id: String, input: JsonValue, }, RunProgressRecorded { progress: WorkflowProgress, }, ChildOperationLinked { child: ChildOperationReference, }, ChildWorkflowRequested { child_id: String, child_run_id: String, spec: WorkflowSpec, input: JsonValue, cancellation_policy: ChildWorkflowCancellationPolicy, }, ChildWorkflowResolved { child_id: String, outcome: WorkflowTerminalOutcome, }, SignalReceived { signal: WorkflowSignal, }, SignalWaitCreated { wait_id: String, signal_name: String, }, SignalWaitCompleted { wait_id: String, signal_id: String, }, StepCreated { step_id: String, step_name: String, input: JsonValue, retry: RetryPolicy, }, StepStarted { step_id: String, attempt: u32, }, StepCompleted { step_id: String, output: JsonValue, }, StepRetrying { step_id: String, attempt: u32, error: String, retry_after: Option<DateTime<Utc>>, }, StepFailed { step_id: String, attempt: u32, error: String, }, WaitCreated { wait_id: String, resume_at: DateTime<Utc>, }, WaitCompleted { wait_id: String, }, HookCreated { hook_id: String, token: String, metadata: JsonValue, }, HookReceived { hook_id: String, payload: JsonValue, }, HookDisposed { hook_id: String, },
}
Expand description

Event persisted as the single source of truth for a workflow run.

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.
§

RunCreated

Creates a run with its immutable definition and initial input.

Fields

§spec: WorkflowSpec

Workflow definition pinned to the run.

§input: JsonValue

Initial JSON input supplied to the workflow.

§

RunStarted

Marks the run as actively executing.

§

RunCompleted

Completes the run successfully.

Fields

§output: JsonValue

Final JSON value returned by the workflow.

§

RunFailed

Terminates the run with an application or runtime error.

Fields

§error: String

Human-readable failure description.

§

RunCancellationRequested

Records a cleanup-aware cancellation request.

Fields

§request: CancellationRequest

Immutable cancellation request delivered during replay.

§

RunCancelled

Completes a requested or forced cancellation.

Fields

§reason: Option<String>

Optional operator- or application-supplied cancellation reason.

§

RunTimedOut

Terminates the run because its deadline elapsed.

Fields

§deadline: DateTime<Utc>

UTC deadline that caused the timeout.

§reason: Option<String>

Optional context for the timeout decision.

§

RunRetryExhausted

Terminates the run after a step uses all permitted attempts.

Fields

§step_id: String

Stable identifier of the exhausted step.

§attempt: u32

Final attempt number that failed.

§error: String

Error returned by the final attempt.

§

RunHostShutdown

Terminates the run because its owning host shut down.

Fields

§reason: Option<String>

Optional host shutdown reason.

§

RunContinuedAsNew

Closes this history and links it to a successor run.

Fields

§successor_run_id: String

Identifier assigned to the successor run.

§input: JsonValue

Initial input persisted for the successor.

§

RunProgressRecorded

Persists the workflow’s latest durable progress report.

Fields

§progress: WorkflowProgress

Progress value made visible to inspectors and observers.

§

ChildOperationLinked

Links an externally managed child operation to the run.

Fields

§child: ChildOperationReference

Stable reference to the linked operation.

§

ChildWorkflowRequested

Requests a first-class child workflow.

Fields

§child_id: String

Parent-local stable identifier used during replay.

§child_run_id: String

Globally addressable run identifier assigned to the child.

§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.

§

ChildWorkflowResolved

Records the terminal result observed from a child workflow.

Fields

§child_id: String

Parent-local identifier from the matching request.

§outcome: WorkflowTerminalOutcome

Terminal outcome returned by the child.

§

SignalReceived

Persists one named asynchronous signal.

Fields

§signal: WorkflowSignal

Signal identity, name, payload, and receipt metadata.

§

SignalWaitCreated

Creates a replay-stable wait for a named signal.

Fields

§wait_id: String

Stable identity of the wait command.

§signal_name: String

Signal contract accepted by the wait.

§

SignalWaitCompleted

Pairs a waiting command with one received signal.

Fields

§wait_id: String

Stable identity of the completed wait.

§signal_id: String

Identifier of the signal consumed by the wait.

§

StepCreated

Creates a durable step invocation.

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.

§

StepStarted

Marks one step attempt as started.

Fields

§step_id: String

Stable identity of the step.

§attempt: u32

One-based attempt number.

§

StepCompleted

Records the successful output of a step.

Fields

§step_id: String

Stable identity of the step.

§output: JsonValue

JSON output returned by the step.

§

StepRetrying

Records a failed attempt that will be retried.

Fields

§step_id: String

Stable identity of the step.

§attempt: u32

Attempt number that failed.

§error: String

Error returned by the attempt.

§retry_after: Option<DateTime<Utc>>

Earliest UTC time for the next attempt, if delayed.

§

StepFailed

Records a step that exhausted its retry policy.

Fields

§step_id: String

Stable identity of the step.

§attempt: u32

Final attempt number that failed.

§error: String

Error returned by the final attempt.

§

WaitCreated

Creates a durable timer wait.

Fields

§wait_id: String

Replay-stable identity of the wait.

§resume_at: DateTime<Utc>

UTC time at which the wait becomes ready.

§

WaitCompleted

Marks a durable timer wait as ready.

Fields

§wait_id: String

Stable identity of the completed wait.

§

HookCreated

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.

§

HookReceived

Records a payload delivered to a hook.

Fields

§hook_id: String

Stable identity of the receiving hook.

§payload: JsonValue

JSON payload supplied by the external caller.

§

HookDisposed

Permanently closes a hook without another payload.

Fields

§hook_id: String

Stable identity of the disposed hook.

Implementations§

Source§

impl FlowEvent

Source

pub fn event_key(&self) -> &'static str

Dot-separated event key for A3S-wide event routing.

Trait Implementations§

Source§

impl Clone for FlowEvent

Source§

fn clone(&self) -> FlowEvent

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 FlowEvent

Source§

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

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

impl<'de> Deserialize<'de> for FlowEvent

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 FlowEvent

Source§

fn eq(&self, other: &FlowEvent) -> 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 FlowEvent

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 FlowEvent

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