pub(crate) struct Dispatcher<D, Bs: Body, I, T> {
conn: Conn<I, Bs::Data, T>,
dispatch: D,
body_tx: Option<Sender>,
body_rx: Pin<Box<Option<Bs>>>,
is_closing: bool,
}
Fields§
§conn: Conn<I, Bs::Data, T>
§dispatch: D
§body_tx: Option<Sender>
§body_rx: Pin<Box<Option<Bs>>>
§is_closing: bool
Implementations§
Source§impl<D, Bs, I, T> Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> Dispatcher<D, Bs, I, T>
pub(crate) fn new(dispatch: D, conn: Conn<I, Bs::Data, T>) -> Self
pub(crate) fn into_inner(self) -> (I, Bytes, D)
Sourcepub(crate) fn poll_without_shutdown(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<()>>
pub(crate) fn poll_without_shutdown( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<()>>
Run this dispatcher until HTTP says this connection is done,
but don’t call Write::shutdown
on the underlying IO.
This is useful for old-style HTTP upgrades, but ignores newer-style upgrade API.
fn poll_catch( &mut self, cx: &mut Context<'_>, should_shutdown: bool, ) -> Poll<Result<Dispatched>>
fn poll_inner( &mut self, cx: &mut Context<'_>, should_shutdown: bool, ) -> Poll<Result<Dispatched>>
fn poll_loop(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_read(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_read_head(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_write(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn close(&mut self)
fn is_done(&self) -> bool
Trait Implementations§
Source§impl<D, Bs, I, T> Future for Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> Future for Dispatcher<D, Bs, I, T>
Auto Trait Implementations§
impl<D, Bs, I, T> Freeze for Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> !RefUnwindSafe for Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> Send for Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> Sync for Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> Unpin for Dispatcher<D, Bs, I, T>
impl<D, Bs, I, T> !UnwindSafe for Dispatcher<D, Bs, I, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_cancellation_token(
self,
cancellation_token: &CancellationToken,
) -> WithCancellationTokenFuture<'_, Self>where
Self: Sized,
fn with_cancellation_token(
self,
cancellation_token: &CancellationToken,
) -> WithCancellationTokenFuture<'_, Self>where
Self: Sized,
Similar to
CancellationToken::run_until_cancelled
,
but with the advantage that it is easier to write fluent call chains,
and biased towards waiting for CancellationToken
to complete. Read moreSource§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
Similar to
CancellationToken::run_until_cancelled_owned
,
but with the advantage that it is easier to write fluent call chains,
and biased towards waiting for CancellationToken
to complete. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more