pub fn build_http_stack(
config: HttpStackConfig,
) -> Result<HttpStack, HttpStackError>Expand description
Builds the full HTTP stack; the result can be fed directly to toac::ApiClient::new.
Current layer order (outer → inner, request direction):
UserAgent → Trace → Timeout? → hyper-util Client
Timeout is inserted only when config.total_timeout = Some(_) — when None,
the entire timeout layer is skipped. This avoids a type mismatch with Identity
when tower::timeout wraps the error as tower::BoxError (option_layer
does not change the error type on the None path).