pub trait UpstreamClient: Send + Sync {
// Required method
fn send<'life0, 'async_trait>(
&'life0 self,
req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn send_websocket<'life0, 'async_trait>(
&'life0 self,
_req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn send_streaming<'life0, 'async_trait>(
&'life0 self,
req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, HeaderMap, RespStream), ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn open_websocket<'life0, 'async_trait>(
&'life0 self,
_req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ConduitSocket>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Host-owned upstream capability. Implementations apply the resolved proxy, TLS profile, capture policy, and platform transport; channels only construct requests and interpret responses.
Required Methods§
fn send<'life0, 'async_trait>(
&'life0 self,
req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn send_websocket<'life0, 'async_trait>(
&'life0 self,
_req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_streaming<'life0, 'async_trait>(
&'life0 self,
req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, HeaderMap, RespStream), ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_websocket<'life0, 'async_trait>(
&'life0 self,
_req: Request<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ConduitSocket>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".