Expand description
Strongly typed Rust client and worker APIs for durable Dex Flows.
Define Flow and Step implementations, register them with Registry, host them with
Worker, and control executions with Client. The crate also exposes typed Attributes,
Channels, waits, decisions, RPCs, lifecycle options, and structured errors.
Structs§
- ApiKey
Credential - Exchanges an application API key for short-lived Dex access tokens.
- ApiKey
Credential Builder - Configures validation, HTTP transport, and the first API-key exchange.
- ApiKey
Credential Error - A validation, transport, timeout, or response failure during API-key exchange.
- Attribute
- Defines one durable, typed value stored with a Flow.
- Attribute
Index - Describes how Dex projects an Attribute value into its Flow-search index.
- Attribute
Lock - Identifies an Attribute or Attribute-map instance lock.
- Attribute
Map - Defines keyed durable values sharing one Attribute name.
- Attribute
MapLoad - Selects one AttributeMap instance to load for a handler invocation.
- Attribute
Match - Describes a scalar Attribute predicate.
- Blob
Cache - Stores immutable Dex blob payloads in a bounded local directory.
- Blob
Cache Config - Configures one persistent
crate::BlobCache. - Buffered
Text Stream - Batches text chunks during one Step invocation.
- Buffered
Text Stream Options - Configures an invocation-managed buffered text Stream writer.
- Channel
- Defines one durable FIFO queue of typed messages.
- Channel
Guard - Identifies a Channel or Channel-map instance that must be empty before conditional completion.
- Channel
Map - Defines independently queued Channel instances under one name.
- Channel
MapLoad - Selects one ChannelMap instance’s pending messages for a handler invocation.
- Channel
Message - Identifies one typed value that is still pending in a Channel.
- Client
- Provides blocking, typed control of registered Dex Flows.
- Client
Options - Configures how a
crate::Clientreaches Dex. - Condition
- Represents one durable timer, Channel, or SubFlow predicate.
- Condition
Combination - Groups conditions that must all succeed as one branch of
Wait::any_combination_of. - Context
- Provides invocation metadata and staged durable changes to Step and RPC handlers.
- Credential
Error - An error obtaining a bearer token before a Dex request.
- File
Credential - Reads a token file at construction and after its modification time or size changes.
- Flow
Config - Overrides runtime behavior for one Flow.
- Flow
Info - Summarizes one Flow run returned by
crate::Client::describe_flow. - Flow
Result - Describes an observed Flow status and its output-bearing completions.
- Flow
Timeout Handler Failure - Routes exhausted Flow timeout-handler retries to an input-free Step.
- Flow
Timeout Handler Options - Configures execution and selective state loading for a Flow timeout handler.
- Handler
Error - Reports an application-defined Step or RPC failure to Dex.
- Persistence
Schema - Declares the Attributes, Channels, and Streams a Flow owns.
- Pull
Queue Registration State - Independent snapshot of one queue’s registration state.
- Pull
Registration Error - Permanent rejection that leaves a pull queue without any registered stream.
- Pull
Registration State - Independent readiness snapshot returned by
crate::Worker::pull_registration_state. - Pull
Worker Options - Configures outbound polling for a Worker.
- Recovery
Error Info - Describes the final failure that caused a Step method recovery.
- Registry
- Validates and stores all Flow definitions used by a Client or Worker.
- Retry
Policy - Overrides Dex retry timing for a Flow,
wait_for, orexecuteoperation. - Rpc
- Names one typed RPC exposed by a Flow.
- RpcDefinition
- Adds execution options to a typed
Rpcbefore handler binding. - RpcInvoke
Options - Adds runtime-selected map instances to one RPC invocation.
- RpcList
- Binds typed RPC definitions to methods on one Flow type.
- RpcResult
- Carries a typed RPC output and optional Step movements.
- Search
Flow Entry - Contains one Flow row returned by a search query.
- Search
Flows Options - Controls inclusion of earlier Continue-as-New runs in visibility searches.
- Search
Flows Page - Contains one page of
crate::Client::search_flowsresults. - Service
Error - Preserves one failed Dex service operation and its transport source.
- Start
Flow Options - Configures a new Flow execution.
- Step
Completion - Contains one output-bearing Step completion returned by
crate::Client::wait_for_flow. - Step
Decision - Describes the durable outcome of one successful Step execution.
- Step
Execution Id - Identifies one execution of a Step type within a Flow run.
- Step
List - Collects a Flow’s starting Step and remaining Step definitions.
- Step
Movement - Targets a Step with encoded input and an optional per-movement options override.
- Step
Options - Configures one Step’s handler execution and persistence behavior.
- Stop
Flow Options - Selects how
crate::Client::stop_flowends an active Flow. - Stream
- Defines a typed best-effort resumable message Stream owned by one Flow type.
- Stream
Message - Describes one retained Stream message returned by Stream Client reads.
- Stream
Messages Page - Contains one newest-first page returned by
crate::Client::list_stream_messages. - SubFlow
- Creates durable SubFlow Conditions and reads their Execute results.
- SubFlow
Options - Configures one durable SubFlow Condition.
- Time
Travel Options - Selects a historical point from which
crate::Client::time_travelcreates a new run. - Timer
- Creates durable timer conditions for Step waits.
- Wait
- Describes when Dex may invoke a Step’s
executehandler. - Wait
ForAttribute Options - Configures one durable Attribute match wait.
- Wait
ForStep Completion Options - Configures one durable Step completion wait.
- Worker
- Runs registered Flow Step and RPC handlers through outbound task streams.
- Worker
Error - Preserves the original Worker-side error carried by a service failure.
- Worker
Options - Configures a pull
crate::Workerand its outbound Dex connection.
Enums§
- Active
Step Search Mode - Controls which active Step types Dex indexes for Flow search.
- Error
SubStatus - Provides Dex-specific detail beyond a gRPC status code.
- Flow
Error Type - Categorizes the failure recorded for an uncompleted Flow.
- Flow
Status - Describes the current or terminal state of a Flow run.
- Flow
Timeout Policy - Controls how Dex responds when a positive soft Flow timeout expires.
- Grpc
Code - gRPC status codes used by
Status. - IdReuse
Policy - Controls whether
crate::Client::start_flow_with_optionsmay reuse a Flow ID. - SdkError
- Reports service, definition, value, handler, and Flow-completion failures.
- Step
Durability - Controls when staged Step persistence must be durably acknowledged.
- SubFlow
Reuse Policy - Controls how a generated SubFlow Flow ID resolves an existing execution.
- Time
Travel Step Method - Selects the Step method used as a Step execution time travel boundary.
- TimerId
- Selects one timer from a Step execution for
crate::Client::skip_timer. - Wait
ForFailure Policy - Selects the terminal behavior after
wait_forexhausts its retry policy.
Traits§
- Credential
- Supplies the current bearer token before each Dex request.
- Flow
- Defines a durable application Flow and its registered API surface.
- Step
- Defines one durable state transition in a Flow.
- Value
- Marks application values that Dex can serialize as JSON and move across handler boundaries.
Type Aliases§
- Flow
Timeout Handler - Function registered by a
Flowto handle expiration of its soft timeout. - Handler
Result - Result returned by application Step and RPC handlers.
- SdkResult
- Result returned by fallible Dex SDK operations.