[−][src]Struct tower_h2::client::Connect
Establishes an H2 client connection.
Has a builder-like API for configuring client connections. Currently this only allows the configuration of TLS transport on new services created by this factory.
Methods
impl<A, C, E, S> Connect<A, C, E, S> where
C: MakeConnection<A>,
E: Executor<Background<C::Connection, S>> + Clone,
S: Body,
S::Data: 'static,
S::Error: Into<Box<dyn Error>>,
[src]
C: MakeConnection<A>,
E: Executor<Background<C::Connection, S>> + Clone,
S: Body,
S::Data: 'static,
S::Error: Into<Box<dyn Error>>,
pub fn new(inner: C, builder: Builder, executor: E) -> Self
[src]
Create a new Connect
.
The connect
argument is used to obtain new session layer instances
(AsyncRead
+ AsyncWrite
). For each new client service returned, a
task will be spawned onto executor
that will be used to manage the H2
connection.
Trait Implementations
impl<A, C, E, S> Service<A> for Connect<A, C, E, S> where
C: MakeConnection<A> + 'static,
E: Executor<Background<C::Connection, S>> + Clone,
S: Body + 'static,
S::Error: Into<Box<dyn Error>>,
[src]
C: MakeConnection<A> + 'static,
E: Executor<Background<C::Connection, S>> + Clone,
S: Body + 'static,
S::Error: Into<Box<dyn Error>>,
type Response = Connection<C::Connection, E, S>
Responses given by the service.
type Error = ConnectError<C::Error>
Errors produced by the service.
type Future = ConnectFuture<A, C, E, S>
The future response value.
fn poll_ready(&mut self) -> Poll<(), Self::Error>
[src]
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, C, E, S> Send for Connect<A, C, E, S> where
A: Send,
C: Send,
E: Send,
S: Send,
A: Send,
C: Send,
E: Send,
S: Send,
impl<A, C, E, S> Sync for Connect<A, C, E, S> where
A: Sync,
C: Sync,
E: Sync,
S: Sync,
A: Sync,
C: Sync,
E: Sync,
S: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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> Erased for T
impl<T, Request> ServiceExt for T where
T: Service<Request> + ?Sized,
[src]
T: Service<Request> + ?Sized,
fn ready(self) -> Ready<Self, Request>
[src]
A future yielding the service when it is ready to accept a request.
fn oneshot(self, req: Request) -> Oneshot<Self, Request>
[src]
Consume this Service
, calling with the providing request once it is ready.
fn call_all<S>(self, reqs: S) -> CallAll<Self, S> where
S: Stream<Item = Request>,
Self::Error: Into<Box<dyn Error + 'static + Send + Sync>>,
<S as Stream>::Error: Into<Box<dyn Error + 'static + Send + Sync>>,
[src]
S: Stream<Item = Request>,
Self::Error: Into<Box<dyn Error + 'static + Send + Sync>>,
<S as Stream>::Error: Into<Box<dyn Error + 'static + Send + Sync>>,
Process all requests from the given Stream
, and produce a Stream
of their responses. Read more
impl<M, S, Target, Request> MakeService 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