[][src]Struct tower_hyper::util::Connector

pub struct Connector<C> { /* fields omitted */ }

A bridge between hyper::client::connect::Connect types and tower_util::MakeConnection.

Example

let connector = Connector::new(HttpConnector::new(1));
let mut hyper = Connect::new(connector);

Methods

impl<C> Connector<C> where
    C: Connect
[src]

pub fn new(inner: C) -> Self[src]

Construct a new connector from a hyper::client::connect::Connect

Trait Implementations

impl<C: Debug> Debug for Connector<C>[src]

impl<C> Service<Destination> for Connector<C> where
    C: Connect
[src]

type Response = C::Transport

Responses given by the service.

type Error = C::Error

Errors produced by the service.

type Future = ConnectorFuture<C>

The future response value.

Auto Trait Implementations

impl<C> Sync for Connector<C> where
    C: Sync

impl<C> Send for Connector<C> where
    C: Send

impl<C> Unpin for Connector<C> where
    C: Unpin

impl<C> RefUnwindSafe for Connector<C> where
    C: RefUnwindSafe

impl<C> UnwindSafe for Connector<C> where
    C: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

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

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

The transport provided by this service that is HTTP aware.

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

Errors produced by the connecting service

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

The future that eventually produces the transport

impl<M, S, Target, Request> MakeService<Target, Request> for M where
    M: Service<Target, Response = S>,
    S: Service<Request>, 
[src]

type Response = <S as Service<Request>>::Response

Responses given by the service

type Error = <S as Service<Request>>::Error

Errors produced by the service

type Service = S

The Service value created by this factory

type MakeError = <M as Service<Target>>::Error

Errors produced while building a service.

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

The future of the Service instance.