[][src]Trait tower_http_util::connection::HttpMakeConnection

pub trait HttpMakeConnection<Target>: Sealed<Target> {
    type Connection: HttpConnection + AsyncRead + AsyncWrite;
    type Error;
    type Future: Future<Item = Self::Connection, Error = Self::Error>;
    fn poll_ready(&mut self) -> Poll<(), Self::Error>;
fn make_connection(&mut self, target: Target) -> Self::Future; }

A Http aware connection creator.

This type is a trait alias that produces HttpConnection aware connections.

Associated Types

type Connection: HttpConnection + AsyncRead + AsyncWrite

The transport provided by this service that is HTTP aware.

type Error

Errors produced by the connecting service

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

The future that eventually produces the transport

Loading content...

Required methods

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

Returns Ready when it is able to make more connections.

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

Connect and return a transport asynchronously

Loading content...

Implementors

impl<C, Target> HttpMakeConnection<Target> for C where
    C: Service<Target>,
    C::Response: HttpConnection + AsyncRead + AsyncWrite
[src]

type Connection = C::Response

type Error = C::Error

type Future = C::Future

Loading content...