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 flow_result;
26mod handler_error;
27mod persistence;
28mod registry;
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 sub_flow;
38mod time_travel_options;
39mod timer;
40mod value;
41mod value_hydrator;
42mod value_mapper;
43mod wait;
44mod worker;
45mod worker_dispatcher;
46mod worker_options;
47
48pub use attribute::{Attribute, AttributeIndex, AttributeMap};
49pub use channel::{Channel, ChannelGuard, ChannelMap};
50pub use client::Client;
51pub use client_options::ClientOptions;
52pub use context::Context;
53pub use dex_blob_cache::{BlobCache, BlobCacheConfig};
54pub use flow::{Flow, FlowTimeoutHandler};
55pub use flow_config::{ActiveStepSearchMode, FlowConfig};
56pub use flow_info::{FlowErrorType, FlowInfo, FlowStatus, SearchFlowEntry, SearchFlowsPage};
57pub use flow_result::{FlowResult, StepCompletion};
58pub use handler_error::{HandlerError, HandlerResult};
59pub use persistence::PersistenceSchema;
60pub use registry::Registry;
61pub use retry_policy::RetryPolicy;
62pub use rpc::{Rpc, RpcDefinition, RpcList, RpcResult};
63pub use sdk_error::{ErrorSubStatus, SdkError, SdkResult, ServiceError, WorkerError};
64pub use start_flow_options::{FlowTimeoutPolicy, IdReusePolicy, StartFlowOptions};
65pub use step::{Step, StepDecision, StepList, StepMovement};
66pub use step_execution::StepExecutionId;
67pub use step_options::{StepDurability, StepOptions, WaitForFailurePolicy};
68pub use stop_flow_options::StopFlowOptions;
69pub use sub_flow::{SubFlow, SubFlowOptions, SubFlowReusePolicy};
70pub use time_travel_options::{TimeTravelOptions, TimeTravelStepMethod};
71pub use timer::{Timer, TimerId};
72pub use tonic::Code as GrpcCode;
73pub use value::Value;
74pub use wait::{Condition, ConditionCombination, Wait};
75pub use worker::Worker;
76pub use worker_options::{WorkerOptions, WorkerTarget};
77
78pub(crate) use value::short_type_name;