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