Skip to main content

Transport

Trait Transport 

Source
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§

Source

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".

Implementors§