Trait ntex::http::client::Connection [−][src]
pub trait Connection { type Io: AsyncRead + AsyncWrite + Unpin; type Future: Future<Output = Result<(ResponseHead, Payload), SendRequestError>>; type TunnelFuture: Future<Output = Result<(ResponseHead, Framed<Self::Io, ClientCodec>), SendRequestError>>; fn protocol(&self) -> Protocol; fn send_request<B: MessageBody + 'static, H: Into<RequestHeadType>>(
self,
head: H,
body: B
) -> Self::Future; fn open_tunnel<H: Into<RequestHeadType>>(
self,
head: H
) -> Self::TunnelFuture; }
Associated Types
type Io: AsyncRead + AsyncWrite + Unpin
[src]
type Future: Future<Output = Result<(ResponseHead, Payload), SendRequestError>>
[src]
type TunnelFuture: Future<Output = Result<(ResponseHead, Framed<Self::Io, ClientCodec>), SendRequestError>>
[src]
Required methods
fn protocol(&self) -> Protocol
[src]
fn send_request<B: MessageBody + 'static, H: Into<RequestHeadType>>(
self,
head: H,
body: B
) -> Self::Future
[src]
fn send_request<B: MessageBody + 'static, H: Into<RequestHeadType>>(
self,
head: H,
body: B
) -> Self::Future
[src]Send request and body
fn open_tunnel<H: Into<RequestHeadType>>(self, head: H) -> Self::TunnelFuture
[src]
fn open_tunnel<H: Into<RequestHeadType>>(self, head: H) -> Self::TunnelFuture
[src]Send request, returns Response and Framed