Trait HttpMakeConnection

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

Source

type Connection: HttpConnection + AsyncRead + AsyncWrite

The transport provided by this service that is HTTP aware.

Source

type Error

Errors produced by the connecting service

Source

type Future: Future<Item = Self::Connection, Error = Self::Error>

The future that eventually produces the transport

Required Methods§

Source

fn poll_ready(&mut self) -> Poll<(), Self::Error>

Returns Ready when it is able to make more connections.

Source

fn make_connection(&mut self, target: Target) -> Self::Future

Connect and return a transport asynchronously

Implementors§

Source§

impl<C, Target> HttpMakeConnection<Target> for C

Source§

type Connection = <C as Service<Target>>::Response

Source§

type Error = <C as Service<Target>>::Error

Source§

type Future = <C as Service<Target>>::Future