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