pub trait HttpMakeConnection<Target>: Sealed<Target> {
type Connection: HttpConnection + AsyncRead + AsyncWrite;
type Error;
type Future: Future<Item = Self::Connection, Error = Self::Error>;
// Required methods
fn poll_ready(&mut self) -> Poll<(), Self::Error>;
fn make_connection(&mut self, target: Target) -> Self::Future;
}
Expand description
A Http aware connection creator.
This type is a trait alias that produces HttpConnection
aware
connections.
Required Associated Types§
Sourcetype Connection: HttpConnection + AsyncRead + AsyncWrite
type Connection: HttpConnection + AsyncRead + AsyncWrite
The transport provided by this service that is HTTP aware.
Sourcetype Future: Future<Item = Self::Connection, Error = Self::Error>
type Future: Future<Item = Self::Connection, Error = Self::Error>
The future that eventually produces the transport
Required Methods§
Sourcefn poll_ready(&mut self) -> Poll<(), Self::Error>
fn poll_ready(&mut self) -> Poll<(), Self::Error>
Returns Ready
when it is able to make more connections.
Sourcefn make_connection(&mut self, target: Target) -> Self::Future
fn make_connection(&mut self, target: Target) -> Self::Future
Connect and return a transport asynchronously