Skip to main content

HttpStack

Type Alias HttpStack 

Source
pub type HttpStack = BoxCloneSyncService<Request, Response<Incoming>, HttpStackError>;
Expand description

Type-erased service returned by build_http_stack.

Takes a toac::Request and returns http::Response<hyper::body::Incoming>, with errors unified as HttpStackError. Each provider passes this to toac::ApiClient::new.

Uses BoxCloneSyncService instead of BoxService: toac’s tower::Service impl requires S: Clone so that after poll_ready, a lock-free clone can be taken for the future — see the mem::replace pattern in toac’s lib.rs.

Aliased Type§

pub struct HttpStack(/* private fields */);