Skip to main content

timvw_rust_runtime/
lib.rs

1#![cfg_attr(
2    all(feature = "reqwest", feature = "retry", feature = "tracing"),
3    doc = include_str!("../README.md")
4)]
5#![cfg_attr(
6    not(all(feature = "reqwest", feature = "retry", feature = "tracing")),
7    doc = "Runtime for Rust clients generated by [openapi-generator-timvw-rust](https://github.com/timvw/openapi-generator-timvw-rust): a tower-based HTTP client. See the README for the guide."
8)]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10
11mod body;
12mod client;
13mod error;
14pub mod multipart;
15mod request;
16mod request_options;
17#[cfg(feature = "reqwest")]
18mod reqwest_service;
19mod response;
20#[cfg(feature = "retry")]
21pub mod retry;
22pub mod sse;
23#[cfg(feature = "tracing")]
24pub mod trace;
25
26pub use body::Body;
27pub use client::{Client, HttpService};
28pub use error::Error;
29pub use request::RequestBuilder;
30pub use request_options::RequestOptions;
31#[cfg(feature = "reqwest")]
32pub use reqwest_service::ReqwestService;
33pub use response::Response;
34
35pub use http;
36pub use http::{header, HeaderMap, Method, StatusCode};
37/// Credentials of a generated `Configuration` are [`SecretString`]s: their `Debug` is redacted, their memory is
38/// zeroed when dropped, and [`ExposeSecret::expose_secret`] reads them.
39pub use secrecy;
40pub use secrecy::{ExposeSecret, SecretString};
41pub use tower;
42
43/// The error type services and layers return: any error that can cross threads.
44pub type BoxError = Box<dyn std::error::Error + Send + Sync>;