[−][src]Struct tower_hyper::client::Connect
Creates a hyper connection
This accepts a hyper::client::conn::Builder and provides
a MakeService implementation to create connections from some
target A
Methods
impl<A, B, C> Connect<A, B, C, DefaultExecutor> where
C: HttpMakeConnection<A>,
B: HttpBody,
C::Connection: Send + 'static, [src]
C: HttpMakeConnection<A>,
B: HttpBody,
C::Connection: Send + 'static,
pub fn new(inner: C) -> Self[src]
Create a new Connect.
The C argument is used to obtain new session layer instances
(AsyncRead + AsyncWrite). For each new client service returned, a
Service is returned that can be driven by poll_service and to send
requests via call.
pub fn with_builder(inner: C, builder: Builder) -> Self[src]
Create a new Connect with a builder.
impl<A, B, C, E> Connect<A, B, C, E> where
C: HttpMakeConnection<A>,
B: HttpBody,
C::Connection: Send + 'static, [src]
C: HttpMakeConnection<A>,
B: HttpBody,
C::Connection: Send + 'static,
pub fn with_executor(inner: C, builder: Builder, exec: E) -> Self[src]
Create a new Connect.
The C argument is used to obtain new session layer instances
(AsyncRead + AsyncWrite). For each new client service returned, a
Service is returned that can be driven by poll_service and to send
requests via call.
The E argument is the executor that the background task for the connection
will be spawned on.
Trait Implementations
impl<A: Debug, B: Debug, C: Debug, E: Debug> Debug for Connect<A, B, C, E>[src]
impl<A, B, C, E> Service<A> for Connect<A, B, C, E> where
C: HttpMakeConnection<A> + 'static,
B: HttpBody + Send + 'static,
B::Data: Send,
B::Error: Into<Box<dyn Error + Send + Sync>>,
C::Connection: Send + 'static,
E: ConnectExecutor<C::Connection, LiftBody<B>> + Clone, [src]
C: HttpMakeConnection<A> + 'static,
B: HttpBody + Send + 'static,
B::Data: Send,
B::Error: Into<Box<dyn Error + Send + Sync>>,
C::Connection: Send + 'static,
E: ConnectExecutor<C::Connection, LiftBody<B>> + Clone,
type Response = Connection<B>
Responses given by the service.
type Error = ConnectError<C::Error>
Errors produced by the service.
type Future = ConnectFuture<A, B, C, E>
The future response value.
fn poll_ready(&mut self) -> Poll<(), Self::Error>[src]
Check if the MakeConnection is ready for a new connection.
fn call(&mut self, target: A) -> Self::Future[src]
Obtains a Connection on a single plaintext h2 connection to a remote.
Auto Trait Implementations
impl<A, B, C, E> Send for Connect<A, B, C, E> where
A: Send,
B: Send,
C: Send,
E: Send,
A: Send,
B: Send,
C: Send,
E: Send,
impl<A, B, C, E> Sync for Connect<A, B, C, E> where
A: Sync,
B: Sync,
C: Sync,
E: Sync,
A: Sync,
B: Sync,
C: Sync,
E: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<M, S, Target, Request> MakeService<Target, Request> for M where
M: Service<Target, Response = S>,
S: Service<Request>, [src]
M: Service<Target, Response = S>,
S: Service<Request>,
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.
fn poll_ready(
&mut self
) -> Result<Async<()>, <M as MakeService<Target, Request>>::MakeError>[src]
&mut self
) -> Result<Async<()>, <M as MakeService<Target, Request>>::MakeError>
fn make_service(
&mut self,
target: Target
) -> <M as MakeService<Target, Request>>::Future[src]
&mut self,
target: Target
) -> <M as MakeService<Target, Request>>::Future