pub trait HttpTransport: Send + Sync {
// Required method
fn execute<'life0, 'async_trait>(
&'life0 self,
req: TransportRequest,
) -> Pin<Box<dyn Future<Output = Result<TransportResponse, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A pluggable HTTP transport.
Implementors execute a single TransportRequest and return a streaming
TransportResponse. fetchkit retains all URL validation, DNS policy, redirect
following, and content handling; only the socket-level send moves here.
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
req: TransportRequest,
) -> Pin<Box<dyn Future<Output = Result<TransportResponse, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
req: TransportRequest,
) -> Pin<Box<dyn Future<Output = Result<TransportResponse, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a single HTTP request hop.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".