Skip to main content

dex_sdk/
lib.rs

1// Copyright (c) 2026 Super Durable, Inc.
2//
3// Licensed under the Super Durable Source License 1.0.
4// You may not use this file except in compliance with the License.
5// See the LICENSE file in the repository root.
6//
7// SPDX-License-Identifier: LicenseRef-Super-Durable-1.0
8
9//! Strongly typed Rust client and worker APIs for durable Dex Flows.
10//!
11//! Define [`Flow`] and [`Step`] implementations, register them with [`Registry`], host them with
12//! [`Worker`], and control executions with [`Client`]. The crate also exposes typed Attributes,
13//! Channels, waits, decisions, RPCs, lifecycle options, and structured errors.
14
15#![deny(missing_docs)]
16
17mod attribute;
18mod channel;
19mod client;
20mod client_options;
21mod context;
22mod flow;
23mod flow_config;
24mod flow_info;
25mod handler_error;
26mod persistence;
27mod registry;
28mod reset_flow_options;
29mod retry_policy;
30mod rpc;
31mod sdk_error;
32mod start_flow_options;
33mod step;
34mod step_execution;
35mod step_options;
36mod stop_flow_options;
37mod timer;
38mod value;
39mod value_hydrator;
40mod value_mapper;
41mod wait;
42mod worker;
43mod worker_dispatcher;
44mod worker_options;
45
46pub use attribute::{Attribute, AttributeIndex, AttributeMap};
47pub use channel::{Channel, ChannelGuard, ChannelMap};
48pub use client::Client;
49pub use client_options::ClientOptions;
50pub use context::Context;
51pub use dex_blob_cache::{BlobCache, BlobCacheConfig};
52pub use flow::Flow;
53pub use flow_config::{ActiveStepSearchMode, FlowConfig};
54pub use flow_info::{FlowErrorType, FlowInfo, FlowStatus, SearchFlowEntry, SearchFlowsPage};
55pub use handler_error::{HandlerError, HandlerResult};
56pub use persistence::PersistenceSchema;
57pub use registry::Registry;
58pub use reset_flow_options::ResetFlowOptions;
59pub use retry_policy::RetryPolicy;
60pub use rpc::{Rpc, RpcDefinition, RpcList, RpcResult};
61pub use sdk_error::{ErrorSubStatus, SdkError, SdkResult, ServiceError, WorkerError};
62pub use start_flow_options::{IdReusePolicy, StartFlowOptions};
63pub use step::{Step, StepDecision, StepList, StepMovement};
64pub use step_execution::StepExecutionId;
65pub use step_options::{StepDurability, StepOptions, WaitForFailurePolicy};
66pub use stop_flow_options::StopFlowOptions;
67pub use timer::{Timer, TimerId};
68pub use tonic::Code as GrpcCode;
69pub use value::Value;
70pub use wait::{Condition, ConditionCombination, Wait};
71pub use worker::Worker;
72pub use worker_options::{WorkerOptions, WorkerTarget};
73
74pub(crate) use value::short_type_name;