Skip to main content

jules_api/
lib.rs

1//! API integrations and client implementation for Jules-SDK.
2
3#![deny(missing_docs)]
4
5pub mod auth;
6pub mod client;
7
8/// Re-exports of [`client::JulesClient`] and [`client::JulesClientBuilder`], the real,
9/// network-capable client. Only available when the `middleware` feature is enabled (the
10/// client relies on `jules_core`'s middleware pipeline) and on non-wasm targets (it relies on
11/// [`http::reqwest_transport::ReqwestTransport`]).
12#[cfg(all(feature = "middleware", not(target_arch = "wasm32")))]
13pub use client::{JulesClient, JulesClientBuilder};
14
15pub mod conversation;
16pub mod errors;
17pub mod http;
18pub mod response;
19pub mod retry;
20pub mod session;
21/// Streaming API abstractions and response handling.
22/// This module is only available when the `streaming` feature is enabled.
23#[cfg(feature = "streaming")]
24pub mod streaming;
25pub mod timeouts;
26
27#[cfg(feature = "wasm")]
28pub mod wasm;
29
30#[cfg(test)]
31mod tests {
32    #[test]
33    fn it_works() {
34        assert_eq!(2 + 2, 4);
35    }
36
37    #[test]
38    #[cfg(feature = "streaming")]
39    fn test_streaming_feature_compiles() {
40        // Ensure the streaming module is accessible when the feature is enabled.
41        #[allow(unused_imports)]
42        use crate::streaming;
43    }
44}
45
46/// Experimental features and APIs.
47///
48/// Items in this module are NOT considered stable and MAY change without notice.
49/// This module is only available when the `experimental` feature is enabled.
50#[cfg(feature = "experimental")]
51#[cfg_attr(docsrs, doc(cfg(feature = "experimental")))]
52pub mod experimental {
53    // Experimental items will be added here
54}