Trait solicit::http::client::HttpConnect
[−]
[src]
pub trait HttpConnect {
type Stream: TransportStream;
type Err: HttpConnectError + 'static;
fn connect(self) -> Result<ClientStream<Self::Stream>, Self::Err>;
}A trait that can be implemented by structs that want to provide the functionality of establishing network connections for use by HTTP/2 connections.
The ClientStream instance returned from the connect method needs to contain
the TransportStream that can be used by an HTTP/2 connection, along with the
appropriate scheme (depending on how the connection was established), and the remote
host name.
The transport stream needs to have already been initialized by writing the client
preface. The helper function write_preface can be used for this purpose.
Associated Types
type Stream: TransportStream
The type of the underlying transport stream that the HttpConnections
produced by this HttpConnect implementation will be based on.
type Err: HttpConnectError + 'static
The type of the error that can be produced by trying to establish the
connection (i.e. calling the connect method).
Required Methods
fn connect(self) -> Result<ClientStream<Self::Stream>, Self::Err>
Establishes a network connection that can be used by HTTP/2 connections.
Implementors
impl<'a> HttpConnect for CleartextConnector<'a>