pub trait Transport: Send + Sync {
// Required method
fn send(
&self,
request: HttpRequest,
max_bytes: usize,
timeout: Duration,
signal: &Signal,
) -> Result<HttpResponse, TransportError>;
}Expand description
Sends one request. A 2xx answer whose content-length (read as a JavaScript Number) exceeds max_bytes, or
whose body grows past it, is TransportError::TooLarge; the deadline (timeout from the call) and the signal
cover the whole exchange, body included.
Required Methods§
fn send( &self, request: HttpRequest, max_bytes: usize, timeout: Duration, signal: &Signal, ) -> Result<HttpResponse, TransportError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".