Skip to main content

IntoHttpTransport

Trait IntoHttpTransport 

pub trait IntoHttpTransport:
    ExtensionsRef
    + Send
    + 'static {
    type Stream: Io + Unpin + ExtensionsRef;

    // Required methods
    fn supports_http_version(version: Version) -> bool;
    fn into_http_transport(self) -> HttpTransport<Self::Stream>;
}
Available on crate features dns and http-backend and http and std and tcp only.
Expand description

Convert an established transport into the HTTP handshake’s transport types. Ordinary byte-stream connectors are supported without an adapter.

Required Associated Types§

Required Methods§

fn supports_http_version(version: Version) -> bool

Whether this transport type can carry the requested HTTP version.

The HTTP connector checks this before dialing. Explicitly accept only understood versions; route-specific support remains the connector’s responsibility. The HTTP handshake still validates the actual transport.

fn into_http_transport(self) -> HttpTransport<Self::Stream>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl IntoHttpTransport for Http3Transport

§

impl<IO> IntoHttpTransport for HttpTransport<IO>
where IO: Io + Unpin + ExtensionsRef,

§

type Stream = IO

§

impl<IO> IntoHttpTransport for IO
where IO: Io + Unpin + ExtensionsRef,

§

type Stream = IO