Skip to main content

Crate durable_workflow

Crate durable_workflow 

Source
Expand description

Minimal Rust SDK for the Durable Workflow worker protocol.

The crate covers the v1 Rust round-trip: start, signal, query, durably sleep, and start and await child workflows; register a Rust worker; poll workflow, activity, and read-only query tasks; reconstruct typed workflow-instance state through deterministic replay; heartbeat worker and activity liveness; and exchange JSON-native payloads through the same avro generic wrapper used by the existing first-party SDKs.

Macros§

json
Construct a serde_json::Value from a JSON literal.

Structs§

ActivityCall
ActivityContext
ActivityFailure
A stable, machine-readable terminal activity failure.
ActivityHeartbeatResponse
ActivityOptions
Options recorded atomically on one deterministic schedule_activity command.
ActivityOptionsError
A machine-readable activity-options validation failure.
ActivityRetryPolicy
Durable server-side retry policy for one activity execution.
ActivityTask
ChildWorkflowCall
Future returned by WorkflowContext::start_child_workflow.
ChildWorkflowFailure
A stable, machine-readable child workflow failure delivered to its parent.
ChildWorkflowOptions
Options recorded with a child-workflow command.
ChildWorkflowResult
A successful child result together with its durable parent-child identity.
ChildWorkflowRetryPolicy
Durable retry policy for one child workflow invocation.
Client
ClientBuilder
HistoryEvent
PayloadEnvelope
PollWorkflowTaskResponse
ProtocolFailure
A stable failure returned when a server rejects an SDK protocol version.
QueryContext
Immutable state supplied to a registered query handler.
QueryFailure
A stable, machine-readable workflow query or query-task settlement failure.
QuerySignal
One decoded signal in the committed workflow-history snapshot.
QueryTask
An ephemeral server-routed query task.
RegisterWorkerResponse
ReplayFailure
A stable, machine-readable failure raised when workflow code no longer reconstructs the durable command stream recorded in history.
SignalCall
TimerCall
Future returned by WorkflowContext::sleep.
Worker
WorkerHeartbeatObservation
WorkerRetryPolicy
Bounded retry policy for worker poll acquisition and worker heartbeats.
WorkflowContext
WorkflowDescription
WorkflowHandle
WorkflowIdentity
The identity of one durable workflow execution.
WorkflowInstance
Typed local state owned by one deterministic workflow invocation.
WorkflowResultOptions
WorkflowTask

Enums§

ActivityBackoff
Backoff intervals for one durable activity retry policy.
ActivityFailureKind
Stable terminal categories returned when an awaited activity does not succeed.
ActivityOptionsErrorKind
Stable validation categories for ActivityOptions.
ChildWorkflowFailureKind
Stable terminal categories returned when an awaited child does not succeed.
Error
ParentClosePolicy
Server behavior when a parent closes while its child is still open.
Value
Represents any valid JSON value.

Constants§

CONTROL_PLANE_VERSION
DEFAULT_CODEC
JSON_CODEC
QUERY_TASKS_CAPABILITY
Worker-registration capability for server-routed read-only queries.
QUERY_TASK_MINIMUM_WORKER_PROTOCOL_VERSION
First additive worker protocol that defines query-task transport.
SDK_VERSION
WORKER_PROTOCOL_VERSION

Functions§

decode_payload
encode_payload

Type Aliases§

Result