Type Alias hyper::client::conn::Http1Dispatcher

source ·
type Http1Dispatcher<T, B> = Dispatcher<Client<B>, B, T, Client>;

Aliased Type§

struct Http1Dispatcher<T, B> {
    conn: Conn<T, <B as Body>::Data, Client>,
    dispatch: Client<B>,
    body_tx: Option<Sender>,
    body_rx: Pin<Box<Option<B>, Global>>,
    is_closing: bool,
}

Fields§

§conn: Conn<T, <B as Body>::Data, Client>§dispatch: Client<B>§body_tx: Option<Sender>§body_rx: Pin<Box<Option<B>, Global>>§is_closing: bool

Implementations§

source§

impl<D, Bs, I, T> Dispatcher<D, Bs, I, T>where D: Dispatch<PollItem = MessageHead<T::Outgoing>, PollBody = Bs, RecvItem = MessageHead<T::Incoming>> + Unpin, D::PollError: Into<Box<dyn StdError + Send + Sync>>, I: AsyncRead + AsyncWrite + Unpin, T: Http1Transaction + Unpin, Bs: HttpBody + 'static, Bs::Error: Into<Box<dyn StdError + Send + Sync>>,

source

pub(crate) fn new(dispatch: D, conn: Conn<I, Bs::Data, T>) -> Self

source

pub(crate) fn disable_keep_alive(&mut self)

source

pub(crate) fn into_inner(self) -> (I, Bytes, D)

source

pub(crate) fn poll_without_shutdown( &mut self, cx: &mut Context<'_> ) -> Poll<Result<()>>where Self: Unpin,

Run this dispatcher until HTTP says this connection is done, but don’t call AsyncWrite::shutdown on the underlying IO.

This is useful for old-style HTTP upgrades, but ignores newer-style upgrade API.

source

fn poll_catch( &mut self, cx: &mut Context<'_>, should_shutdown: bool ) -> Poll<Result<Dispatched>>

source

fn poll_inner( &mut self, cx: &mut Context<'_>, should_shutdown: bool ) -> Poll<Result<Dispatched>>

source

fn poll_loop(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>

source

fn poll_read(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>

source

fn poll_read_head(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>

source

fn poll_write(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>

source

fn poll_flush(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>

source

fn close(&mut self)

source

fn is_done(&self) -> bool

Trait Implementations§

source§

impl<D, Bs, I, T> Future for Dispatcher<D, Bs, I, T>where D: Dispatch<PollItem = MessageHead<T::Outgoing>, PollBody = Bs, RecvItem = MessageHead<T::Incoming>> + Unpin, D::PollError: Into<Box<dyn StdError + Send + Sync>>, I: AsyncRead + AsyncWrite + Unpin, T: Http1Transaction + Unpin, Bs: HttpBody + 'static, Bs::Error: Into<Box<dyn StdError + Send + Sync>>,

§

type Output = Result<Dispatched, Error>

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more