[][src]Struct tower_h2::client::Connection

pub struct Connection<T, E, S> where
    S: Body
{ /* fields omitted */ }

Exposes a request/response API on an h2 client connection..

Methods

impl<T, E, S> Connection<T, E, S> where
    S: Body,
    S::Data: 'static,
    S::Error: Into<Box<dyn Error>>,
    E: Executor<Background<T, S>>,
    T: AsyncRead + AsyncWrite
[src]

pub fn handshake(io: T, executor: E) -> Handshake<T, E, S>[src]

Perform the HTTP/2.0 handshake, yielding a Connection on completion.

Trait Implementations

impl<T, E, S> Clone for Connection<T, E, S> where
    S: Body,
    E: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T, E, S> Service<Request<S>> for Connection<T, E, S> where
    S: Body + 'static,
    S::Data: 'static,
    S::Error: Into<Box<dyn Error>>,
    E: Executor<Background<T, S>>,
    T: AsyncRead + AsyncWrite
[src]

type Response = Response<RecvBody>

Responses given by the service.

type Error = Error

Errors produced by the service.

type Future = ResponseFuture

The future response value.

Auto Trait Implementations

impl<T, E, S> Send for Connection<T, E, S> where
    E: Send,
    S: Send,
    T: Send,
    <S as Body>::Data: Buf + Send

impl<T, E, S> Sync for Connection<T, E, S> where
    E: Sync,
    S: Sync,
    T: Sync,
    <S as Body>::Data: Buf + Send

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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, B1, B2> HttpService for T where
    B2: Body,
    T: Service<Request<B1>, Response = Response<B2>>, 
[src]

type ResponseBody = B2

Response payload.

type Error = <T as Service<Request<B1>>>::Error

Errors produced by the service.

type Future = <T as Service<Request<B1>>>::Future

The future response value.

fn into_service(self) -> IntoService<Self>[src]

Wrap the HttpService so that it implements tower_service::Service directly. Read more

fn as_service(&mut self) -> AsService<Self>[src]

Same as into_service but operates on an HttpService reference.

impl<T> Erased for T

impl<T, Request> ServiceExt for T where
    T: Service<Request> + ?Sized
[src]

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]

Process all requests from the given Stream, and produce a Stream of their responses. Read more