pub struct Connector<C> { /* private fields */ }Expand description
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);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Connector<C>where
C: Freeze,
impl<C> RefUnwindSafe for Connector<C>where
C: RefUnwindSafe,
impl<C> Send for Connector<C>where
C: Send,
impl<C> Sync for Connector<C>where
C: Sync,
impl<C> Unpin for Connector<C>where
C: Unpin,
impl<C> UnsafeUnpin for Connector<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Connector<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<C, Target> HttpMakeConnection<Target> for Cwhere
C: Service<Target>,
<C as Service<Target>>::Response: HttpConnection + AsyncRead + AsyncWrite,
impl<C, Target> HttpMakeConnection<Target> for Cwhere
C: Service<Target>,
<C as Service<Target>>::Response: HttpConnection + AsyncRead + AsyncWrite,
Source§type Connection = <C as Service<Target>>::Response
type Connection = <C as Service<Target>>::Response
The transport provided by this service that is HTTP aware.
Source§type Future = <C as Service<Target>>::Future
type Future = <C as Service<Target>>::Future
The future that eventually produces the transport
Source§fn poll_ready(
&mut self,
) -> Result<Async<()>, <C as HttpMakeConnection<Target>>::Error>
fn poll_ready( &mut self, ) -> Result<Async<()>, <C as HttpMakeConnection<Target>>::Error>
Returns
Ready when it is able to make more connections.Source§fn make_connection(
&mut self,
target: Target,
) -> <C as HttpMakeConnection<Target>>::Future
fn make_connection( &mut self, target: Target, ) -> <C as HttpMakeConnection<Target>>::Future
Connect and return a transport asynchronously
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<C, Target> MakeConnection<Target> for C
impl<C, Target> MakeConnection<Target> for C
Source§type Connection = <C as Service<Target>>::Response
type Connection = <C as Service<Target>>::Response
The transport provided by this service
Source§type Future = <C as Service<Target>>::Future
type Future = <C as Service<Target>>::Future
The future that eventually produces the transport
Source§fn poll_ready(
&mut self,
) -> Result<Async<()>, <C as MakeConnection<Target>>::Error>
fn poll_ready( &mut self, ) -> Result<Async<()>, <C as MakeConnection<Target>>::Error>
Returns
Ready when it is able to make more connections.Source§fn make_connection(
&mut self,
target: Target,
) -> <C as MakeConnection<Target>>::Future
fn make_connection( &mut self, target: Target, ) -> <C as MakeConnection<Target>>::Future
Connect and return a transport asynchronously
Source§impl<M, S, Target, Request> MakeService<Target, Request> for M
impl<M, S, Target, Request> MakeService<Target, Request> for M
Source§fn poll_ready(
&mut self,
) -> Result<Async<()>, <M as MakeService<Target, Request>>::MakeError>
fn poll_ready( &mut self, ) -> Result<Async<()>, <M as MakeService<Target, Request>>::MakeError>
Returns
Ready when the factory is able to process create more services. Read moreSource§fn make_service(
&mut self,
target: Target,
) -> <M as MakeService<Target, Request>>::Future
fn make_service( &mut self, target: Target, ) -> <M as MakeService<Target, Request>>::Future
Create and return a new service value asynchronously.