toolkit_contract/runtime/mod.rs
1//! Runtime helpers shared by generated REST clients.
2//!
3//! Gated behind the `runtime-client` feature so SDK crates can re-export the
4//! contract types without pulling in `toolkit-http` / `tokio` transitively.
5//!
6//! ### Why a submodule, not its own crate
7//!
8//! The `runtime-client` feature already provides the same isolation as a
9//! crate boundary would — IR-only consumers don't compile or link any of
10//! the HTTP/SSE/retry plumbing. Splitting into a separate
11//! `toolkit-contract-runtime` crate would add Cargo / CI ceremony without
12//! changing what gets compiled in either configuration. The split is only
13//! warranted if a hand-written client wants to consume the runtime
14//! standalone (without `toolkit-contract`'s IR + macros). Until that
15//! consumer exists, YAGNI.
16
17pub mod transport_error;
18
19#[cfg(feature = "canonical-errors")]
20pub mod canonical;
21
22#[cfg(feature = "runtime-client")]
23pub mod client;
24#[cfg(feature = "runtime-client")]
25pub mod config;
26#[cfg(feature = "runtime-client")]
27pub mod http;
28#[cfg(feature = "runtime-client")]
29pub mod retry;
30#[cfg(feature = "runtime-client")]
31pub mod sse;
32
33#[cfg(feature = "rest-client")]
34pub mod resolving;